71 Commits
0.7 ... 0.13.6

Author SHA1 Message Date
9fb0b98c6a live-s6: drop alpm hook 2022-04-10 02:03:41 +02:00
a606b09367 0.13.5 2022-03-11 10:02:33 -06:00
a94e642103 simplify square brackets 2022-02-13 01:33:14 +02:00
1c6a1e592c Merge pull request 's6: update to the new s6-rc format' (#12) from s6-new-format into master
Reviewed-on: artix/live-services#12
2022-01-27 12:48:03 +01:00
f29508d011 s6: update to the new s6-rc format
s6-scripts finally updated to the new s6-rc format so the live-service
needs to change its formating to match. The main advantage of this is
that there is no need to sed in artix-live and pacman-init into the
contents file during the alpm hook. Instead, the empty files can just be
installed into the directory. It's much cleaner. As an aside, a couple
of BMODE calls in the makefile were changed to FMODE since s6-rc doesn't
need any of these files to be executable.
2022-01-23 13:17:33 -06:00
a28ed7f20d 0.13.4 2022-01-21 13:49:04 -06:00
4739509ac7 liveservices-hook: Merge broken sed arguments into single lines
Signed-off-by: strajder <strajder@artixlinux.org>
2022-01-21 20:40:59 +01:00
2d8d60c0bc fuck -e 2022-01-21 21:13:49 +02:00
04363a50bb makefile bump 2022-01-21 16:04:31 +02:00
f1368b1aa7 fix crash in DE 2022-01-21 15:59:08 +02:00
51ef407331 0.13.1 2022-01-20 19:24:07 -06:00
33d9fd2da3 66: remove pointless fdmove in pacman-init
This was originally copied over from the s6 oneshot script. The fdmove
line is not needed and serves no purpose. Just remove it.
2022-01-20 19:20:45 -06:00
56f1455c77 makefile: add alpm hooks to install_s6/66 2022-01-20 19:20:45 -06:00
5b35f20375 liveservices-hook: Add 66-specific setup
Signed-off-by: strajder <strajder@artixlinux.org>
2022-01-20 19:20:45 -06:00
730908dc51 add alpm-hook for live services
Only s6 and suite66 actually need to use this.
2022-01-20 19:20:45 -06:00
9672ce5b46 0.13 2022-01-21 00:50:37 +02:00
9cf651405e 0.12.3 2022-01-20 19:55:32 +02:00
65c79b931c 0.12.2 2022-01-08 08:25:34 +07:00
19fae52dc0 0.12.1 2022-01-08 08:20:23 +07:00
1f62798998 dinit: use live.d for live services 2022-01-08 08:19:29 +07:00
231acc723b rc: use a display-manager provide 2022-01-04 18:04:25 +01:00
dafee38770 Update 'bin/desktop-items.in' 2021-12-31 20:59:30 +01:00
91f8c5d64a s6: minor cleanups
The "live" bundle is pointless and superfluous. Remove it. Also, the
pacman-init up oneshot had a useless fdmove line in it. Remove that as
well.
2021-12-30 18:02:30 -06:00
0bff2c5715 complete list 2021-12-31 00:14:12 +02:00
88ebe2ee63 openrc: start before display manager 2021-12-30 23:12:40 +02:00
d253e889c5 0.12 2021-12-22 02:32:57 +02:00
71cb6715a5 add dinit 2021-12-22 02:21:01 +02:00
a4c443b658 0.11.3 2021-11-05 23:53:40 +07:00
a1c122c058 Merge pull request 'add initial support for dinit' (#10) from konimex/live-services:master into master
Reviewed-on: artix/live-services#10
2021-11-05 16:34:25 +01:00
bea63084ab add initial support for dinit 2021-10-27 17:02:51 +07:00
83b9a674a8 0.11.2 2021-10-20 14:10:14 +03:00
26ffee5d7c Merge pull request 'fix suite66 pdf' (#9) from nous/live-services:master into master
Reviewed-on: artix/live-services#9
2021-10-20 13:01:51 +02:00
8c3a81d0ee fix suite66 pdf 2021-10-20 13:00:23 +02:00
91b23a5265 remove archlinux keyring 2021-07-12 00:05:56 +02:00
aa58c995eb Add haveged depends 2021-05-03 01:18:36 +02:00
68b91bc6ec Merge pull request 'Add 66 to Makefile' (#8) from ndowens/live-services:master into master
Reviewed-on: artix/live-services#8
2021-04-30 01:33:15 +02:00
e3c3b5d9a5 Add 66 to Makefile 2021-04-29 17:33:08 -05:00
edaf1d8c0b Merge pull request 'Add 66 services' (#7) from ndowens/live-services:master into master
Reviewed-on: artix/live-services#7
2021-04-30 00:05:48 +02:00
3d97503604 Add 66 services 2021-04-29 17:01:33 -05:00
e9e2ec9d9e live (#6)
set service paths via make

use more make vars

fix session & desktop detection

move liveuser declare

shellcheck

update sysusers

make the live user configurable with make

cleanup log

properly copy user skel

create live home

add sysusers file

refactor

v0.10

update live.conf

artix-live: remove some config

use m4_include()

Reviewed-on: artix/live-services#6
Co-Authored-By: artoo <artoo@artixlinux.org>
Co-Committed-By: artoo <artoo@artixlinux.org>
2021-01-08 19:48:44 +01:00
320dc22775 I am stupid 2020-11-29 01:44:05 +02:00
759f8236f1 Merge branch 'master' of https://gitea.artixlinux.org/artix/live-services 2020-11-27 15:56:48 +02:00
51017c4789 change calamares icon in i18n 2020-11-27 15:56:27 +02:00
9fafba1f67 change order of plasma, to fix community-qt default DE 2020-11-25 16:25:13 +01:00
1bb3f828fe force copy just in case 2020-11-24 17:39:34 +02:00
76618b8ffe fix calamares not shown correctly in MATE and Cinnamon 2020-11-24 17:37:00 +02:00
b0accd6320 fix i18n symlinking and reinstate calamares 2020-11-22 02:56:01 +02:00
186c4cc944 check for neofetch 2020-07-26 16:29:42 +02:00
36b3def4df Merge pull request 'set branding' (#4) from neo into master 2020-07-26 16:27:49 +02:00
bff662b2bb remeove s6 pacman-init dependencies file 2020-07-26 16:26:06 +02:00
6a830fd09e Merge pull request 'pacman-init: make sure /etc/pacman.d/gnupg exists' (#5) from s6-fix into master 2020-03-21 19:49:51 +01:00
53738530d9 add s6.pdf 2020-02-08 22:51:05 +01:00
2008d08da2 update desktop.map 2020-02-08 18:34:02 +01:00
f1a229a2b2 pacman-init: make sure /etc/pacman.d/gnupg exists
Noticed that this directory may not exist so the mount fails.
2020-01-17 22:33:28 -06:00
8163c1574f set branding 2019-12-23 21:23:28 +01:00
61bc0ee372 Merge branch 'master' of gitea.artixlinux.org:artix/live-services 2019-12-12 00:09:34 +01:00
dd34bf3df9 create user early to make autologin work 2019-12-12 00:09:29 +01:00
36614abf6a Add xdg-user-dirs-update --force to catch race condition in
MATE
2019-12-09 17:59:45 +02:00
96cc41dcde remove potable efi helper 2019-11-17 00:48:35 +01:00
b2d2877df9 fix datadir 2019-10-30 19:53:59 +01:00
d051f3f73b Makefile: install s6 2019-10-28 22:19:46 +01:00
90bb86cec1 Merge branch 's6-support-branch' of artix/live-services into master 2019-10-28 22:01:39 +01:00
e9e0e0be8f Create a bundle for artix-live and pacman-init 2019-10-28 15:56:29 -05:00
82e6b1edea Merge branch 's6-support-branch' of artix/live-services into master 2019-10-28 21:36:09 +01:00
bea5c4dfd6 s6 update 2019-10-28 09:22:10 -05:00
a3751e733b rename rc services 2019-10-02 00:53:19 +02:00
88cae232da initial s6 support 2019-10-02 00:31:46 +02:00
3861ade296 update 2019-01-06 03:41:03 +01:00
20401b1e4f util-live: update load_live_config() 2019-01-06 03:39:33 +01:00
a5920b81da clean up 2019-01-03 22:38:07 +01:00
5a1bddf043 start 0.8 2019-01-03 22:30:16 +01:00
31 changed files with 441 additions and 326 deletions

View File

@@ -1,6 +1,6 @@
BSD 2-Clause License BSD 2-Clause License
Copyright (c) 2017, Cromnix GNU/Linux Copyright (c) 2018-2021, Artix Linux
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

127
Makefile
View File

@@ -1,29 +1,30 @@
VERSION = 0.7 VERSION = 0.13.5
PKG = live-services PKG = live-services
TOOLS = artools TOOLS = artools
SYSCONFDIR = /etc SYSCONFDIR = /etc
ifdef PREFIX PREFIX ?= /usr
PREFIX = /usr/local
endif
BINDIR = $(PREFIX)/bin BINDIR = $(PREFIX)/bin
LIBDIR = $(PREFIX)/lib LIBDIR = $(PREFIX)/lib
DATADIR = $(PREFIX)/share DATADIR = $(PREFIX)/share
SYSUSERSDIR = $(PREFIX)/lib/sysusers.d
LIVEUSER ?= artix
HOOKSDIR = $(DATADIR)/libalpm/hooks
SCRIPTSDIR = $(DATADIR)/libalpm/scripts
FMODE = -m0644 FMODE = -m0644
DMODE = -dm0755 DMODE = -dm0755
BMODE = -m0755 BMODE = -m0755
RM = rm -f
M4 = m4 -P
CHAW = chmod a-w ALPMSCRIPTS = $(wildcard libalpm/scripts/*)
CHX = chmod +x ALPMHOOKS = $(wildcard libalpm/hooks/*)
BIN = \ BIN = \
bin/artix-live bin/artix-live
LIBS = $(wildcard lib/*.sh)
SHARED = \ SHARED = \
$(wildcard data/*.map) \ $(wildcard data/*.map) \
data/live.conf data/live.conf
@@ -39,42 +40,81 @@ RUNIT_SVD = \
RUNIT_SV = \ RUNIT_SV = \
data/runit/pacman-init.run data/runit/pacman-init.run
GRUB_DEFAULT = \ S6_DEFAULT = \
data/grub2-portable-efi data/s6/default/contents.d/artix-live \
data/s6/default/contents.d/pacman-init
GRUB_D = \ S6_LIVE = \
data/99_zzz-portable-efi data/s6/artix-live/up \
data/s6/artix-live/type
S6_PI = \
data/s6/pacman-init/type \
data/s6/pacman-init/up \
data/s6/pacman-init/down
66_LIVE = \
data/66/artix-live
66_PI = \
data/66/pacman-init
DINIT_LIVE = \
data/dinit/artix-live
DINIT_PI = \
data/dinit/pacman-init
DINIT_PI_SCRIPT = \
data/dinit/pacman-init.script
XDG = $(wildcard data/*.desktop) XDG = $(wildcard data/*.desktop)
XBIN = bin/desktop-items XBIN = bin/desktop-items
all: $(BIN) $(RC) $(RUNIT_SV) $(XBIN) $(GRUB_D) SYSUSERS = \
data/sysusers
EDIT = sed -e "s|@datadir[@]|$(DATADIR)/$(TOOLS)|g" \ RM = rm -f
-e "s|@sysconfdir[@]|$(SYSCONFDIR)/$(TOOLS)|g" \ M4 = m4 -P
-e "s|@libdir[@]|$(LIBDIR)/$(TOOLS)|g" CHMODAW = chmod a-w
CHMODX = chmod +x
%: %.in Makefile all: $(BIN) $(SYSUSERS) $(XBIN) $(RC) $(RUNIT_SVD) $(S6_PI) $(S6_LIVE)
EDIT = sed -e "s|@datadir[@]|$(DATADIR)|g" \
-e "s|@sysconfdir[@]|$(SYSCONFDIR)|g" \
-e "s|@bindir[@]|$(BINDIR)|g" \
-e "s|@libdir[@]|$(LIBDIR)|g" \
-e "s|@live[@]|$(LIVEUSER)|g"
%: %.in Makefile lib/util-live.sh
@echo "GEN $@" @echo "GEN $@"
@$(RM) "$@" @$(RM) "$@"
@$(M4) $@.in | $(EDIT) >$@ @{ echo -n 'm4_changequote([[[,]]])'; cat $@.in; } | $(M4) | $(EDIT) >$@
@$(CHAW) "$@" @$(CHMODAW) "$@"
@$(CHX) "$@" @$(CHMODX) "$@"
@bash -O extglob -n "$@"
clean: clean:
$(RM) $(BIN) $(RC) $(GRUB_D) $(RM) $(BIN) $(SYSUSERS) $(XBIN) $(RC) $(RUNIT_SVD) $(S6_PI) $(S6_LIVE)
install_base: install_base:
install $(DMODE) $(DESTDIR)$(BINDIR) install $(DMODE) $(DESTDIR)$(BINDIR)
install $(BMODE) $(BIN) $(DESTDIR)$(BINDIR) install $(BMODE) $(BIN) $(DESTDIR)$(BINDIR)
install $(DMODE) $(DESTDIR)$(LIBDIR)/$(TOOLS) install $(DMODE) $(DESTDIR)$(SYSUSERSDIR)
install $(FMODE) $(LIBS) $(DESTDIR)$(LIBDIR)/$(TOOLS) install $(FMODE) $(SYSUSERS) $(DESTDIR)$(SYSUSERSDIR)/live-artix.conf
install $(DMODE) $(DESTDIR)$(DATADIR)/$(TOOLS) install $(DMODE) $(DESTDIR)$(DATADIR)/$(TOOLS)
install $(FMODE) $(SHARED) $(DESTDIR)$(DATADIR)/$(TOOLS) install $(FMODE) $(SHARED) $(DESTDIR)$(DATADIR)/$(TOOLS)
install_alpm:
install $(DMODE) $(DESTDIR)$(SCRIPTSDIR)
install $(DMODE) $(DESTDIR)$(HOOKSDIR)
install $(BMODE) $(ALPMSCRIPTS) $(DESTDIR)$(SCRIPTSDIR)
install $(FMODE) $(ALPMHOOKS) $(DESTDIR)$(HOOKSDIR)
install_rc: install_rc:
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/init.d install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/init.d
install $(BMODE) $(RC) $(DESTDIR)$(SYSCONFDIR)/init.d install $(BMODE) $(RC) $(DESTDIR)$(SYSCONFDIR)/init.d
@@ -83,18 +123,39 @@ install_runit:
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/rc/sysinit install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/rc/sysinit
install $(DMODE) $(DESTDIR)$(LIBDIR)/rc/sv.d install $(DMODE) $(DESTDIR)$(LIBDIR)/rc/sv.d
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/runit/sv/pacman-init
install $(BMODE) $(RUNIT_SVD) $(DESTDIR)$(LIBDIR)/rc/sv.d install $(BMODE) $(RUNIT_SVD) $(DESTDIR)$(LIBDIR)/rc/sv.d
ln -sf $(LIBDIR)/rc/sv.d/live $(DESTDIR)$(SYSCONFDIR)/rc/sysinit/98-live ln -sf $(LIBDIR)/rc/sv.d/live $(DESTDIR)$(SYSCONFDIR)/rc/sysinit/98-live
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/runit/sv/pacman-init
install $(BMODE) $(RUNIT_SV) $(DESTDIR)$(SYSCONFDIR)/runit/sv/pacman-init/run install $(BMODE) $(RUNIT_SV) $(DESTDIR)$(SYSCONFDIR)/runit/sv/pacman-init/run
install_portable_efi: install_s6:
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/default install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/sv
install $(BMODE) $(GRUB_DEFAULT) $(DESTDIR)$(SYSCONFDIR)/default install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/adminsv
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/grub.d install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/adminsv/default/contents.d
install $(BMODE) $(GRUB_D) $(DESTDIR)$(SYSCONFDIR)/grub.d install $(FMODE) $(S6_DEFAULT) $(DESTDIR)$(SYSCONFDIR)/s6/adminsv/default/contents.d/
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/pacman-init
install $(FMODE) $(S6_PI) $(DESTDIR)$(SYSCONFDIR)/s6/sv/pacman-init/
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/artix-live
install $(FMODE) $(S6_LIVE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/artix-live/
install_66: install_alpm
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/66/service
install $(FMODE) $(66_LIVE) $(DESTDIR)$(SYSCONFDIR)/66/service/artix-live
install $(FMODE) $(66_PI) $(DESTDIR)$(SYSCONFDIR)/66/service/pacman-init
install_dinit:
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/dinit.d/scripts
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/dinit.d/live.d
install $(FMODE) $(DINIT_LIVE) $(DESTDIR)$(SYSCONFDIR)/dinit.d/artix-live
install $(FMODE) $(DINIT_PI) $(DESTDIR)$(SYSCONFDIR)/dinit.d/pacman-init
install $(BMODE) $(DINIT_PI_SCRIPT) $(DESTDIR)$(SYSCONFDIR)/dinit.d/scripts/pacman-init
ln -s ../artix-live $(DESTDIR)$(SYSCONFDIR)/dinit.d/live.d
ln -s ../pacman-init $(DESTDIR)$(SYSCONFDIR)/dinit.d/live.d
install_xdg: install_xdg:
install -dm0755 $(DESTDIR)$(PREFIX)/bin install -dm0755 $(DESTDIR)$(PREFIX)/bin
@@ -103,6 +164,6 @@ install_xdg:
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/skel/.config/autostart install -dm0755 $(DESTDIR)$(SYSCONFDIR)/skel/.config/autostart
install -m0755 ${XDG} $(DESTDIR)$(SYSCONFDIR)/skel/.config/autostart install -m0755 ${XDG} $(DESTDIR)$(SYSCONFDIR)/skel/.config/autostart
install: install_base install_rc install_portable_efi install_xdg install: install_base install_rc install_runit install_s6 install_xdg
.PHONY: all clean install uninstall dist .PHONY: install

View File

@@ -1 +1 @@
# live-services # live-services

View File

@@ -1,50 +1,23 @@
#!/bin/sh #!/bin/bash
m4_include(lib/util-live.sh)
LIBDIR='@libdir@'
DATADIR='@datadir@'
SYSCONFDIR='@sysconfdir@'
LOGFILE='/var/log/artix-live.log' LOGFILE='/var/log/artix-live.log'
export LC_MESSAGES=C
export LANG=C
livetimer=$(date +%s%3N)
[[ -r ${LIBDIR}/util-live.sh ]] && source ${LIBDIR}/util-live.sh
load_live_config "${SYSCONFDIR}/live.conf" || load_live_config "${DATADIR}/live.conf"
livetimer=$(get_timer_ms)
detect_desktop_env
echo "Detected ${DEFAULT_DESKTOP_EXECUTABLE} ${DEFAULT_DESKTOP_FILE}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
livetimer=$(get_timer_ms)
CONSOLEFONT="$(kernel_cmdline vconsole.font)" CONSOLEFONT="$(kernel_cmdline vconsole.font)"
CONSOLEMAP="$(kernel_cmdline vconsole.font.map)" CONSOLEMAP="$(kernel_cmdline vconsole.font.map)"
arch=$(uname -m) #echo "Got consolefont ${CONSOLEFONT} and consolemap ${CONSOLEMAP}" >> "${LOGFILE}"
echo "Got consolefont and arch $arch: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
# Activate swap
livetimer=$(get_timer_ms)
configure_swap configure_swap
echo "Activated swap and added to fstab: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
livetimer=$(get_timer_ms)
configure_language configure_language
echo "Finished localization: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
livetimer=$(get_timer_ms)
configure_user configure_user
echo "Created user ${USER_NAME} with password ${PASSWORD}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
livetimer=$(get_timer_ms) detect_desktop_env
configure_accountsservice "${USER_NAME}"
echo "Configured accountsservice: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}" configure_accountsservice
livetimer=$(get_timer_ms)
configure_displaymanager configure_displaymanager
echo "Configured displaymanager: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
livetimer=$(get_timer_ms) configure_branding
configure_user_root /
echo "Configured root user: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"

View File

@@ -1,28 +1,39 @@
#!/bin/sh #!/bin/sh
# Ensure the user directories are created, some DEs (MATE)
# create them after autostart scripts are run
xdg-user-dirs-update --force
xdg=$(xdg-user-dir DESKTOP) xdg=$(xdg-user-dir DESKTOP)
src=/usr/share/applications src=@datadir@/applications
if [[ -f $src/org.kde.konversation.desktop ]]; then # if [ -f $src/org.kde.konversation.desktop ]; then
install -m644 $src/org.kde.konversation.desktop \ # install -m644 $src/org.kde.konversation.desktop \
$xdg/org.kde.konversation.desktop # $xdg/org.kde.konversation.desktop
fi
# if [[ -f /usr/bin/calamares ]]; then
# cp $src/calamares.desktop \
# $xdg/calamares.desktop
# fi # fi
docs=/usr/share/doc/artix if [ -f @bindir@/calamares ]; then
cp -f $src/calamares.desktop "$xdg/"
for f in {Configuration,Troubleshooting}.pdf;do sed -i s/Icon.*=calamares/Icon=artixlinux-logo/g "$xdg"/calamares.desktop
ln -s $docs/$f $xdg/$f chmod +x "$xdg/calamares.desktop"
done
if [[ -d /run/openrc ]];then
ln -s $docs/OpenRC.pdf $xdg/OpenRC.pdf
else
ln -s $docs/Runit.pdf $xdg/Runit.pdf
fi fi
echo "live session details: /var/log/artix-live.log" > $xdg/README.txt docs=@datadir@/doc/artix
for f in {Configuration,Troubleshooting}.pdf; do
ln -s $docs/$f "$xdg"/$f
done
if [ -d /run/openrc ]; then
ln -s $docs/OpenRC.pdf "$xdg"/OpenRC.pdf
elif [ -d /run/runit ]; then
ln -s $docs/Runit.pdf "$xdg"/Runit.pdf
elif [ -d /run/66 ]; then
ln -s $docs/Suite66.pdf "$xdg"/Suite66.pdf
elif [ -d /run/dinit ]; then
ln -s $docs/Dinit.pdf "$xdg"/Dinit.pdf
else
ln -s $docs/S6.pdf "$xdg"/S6.pdf
fi
echo "live session details: /var/log/artix-live.log" > "$xdg"/README.txt

8
data/66/artix-live Normal file
View File

@@ -0,0 +1,8 @@
[main]
@type = oneshot
@version = 0.0.1
@description = "artix-live service"
@user = ( root )
[start]
@execute = (artix-live)

13
data/66/pacman-init Normal file
View File

@@ -0,0 +1,13 @@
[main]
@type = oneshot
@description = "pacman init service"
@version = 0.0.2
@user = ( root )
@extdepends = ( haveged )
[start]
@execute = (
foreground { mkdir -p /etc/pacman.d/gnupg }
foreground { mount -t tmpfs -o size=10M,mode=0755 tmpfs /etc/pacman.d/gnupg }
foreground { pacman-key --init }
foreground { pacman-key --populate artix } )

View File

@@ -1,49 +0,0 @@
#!/bin/sh
# grub-mkconfig helper script.
#
# Copyright © 2014 Niall Walsh <niallwalsh@celtux.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
set -e
AT_EFI_STANDALONE=""
AT_EFI_PORTABLE_PATH="/boot/efi/EFI/BOOT"
# override tool behaviour through /etc/default/grub2-fll-standalone
if [ -r /etc/default/grub2-portable-efi ]; then
. /etc/default/grub2-portable-efi
fi
patt='[[:space:]]-o[[:space:]]\+/boot/grub/grub.cfg'
# do nothing if disabled or grub-mkconfig is generating /boot/grub/grub.cfg
( [ "${AT_EFI_STANDALONE}" != "disable" ] && \
ps x | grep 'grub-mkconfig[[:space:]]' | grep -q -e "${patt}[[:space:]]" -e "${patt}$" ) || exit
beeb="${AT_EFI_PORTABLE_PATH}"
if [ -e "${beeb}" ]; then
# do not do anything to a beeb we didn't create
[ ! -e "${beeb}/fullstory" ] && exit
else
# create beeb and mark it as ours
mkdir -p "${beeb}"
touch "${beeb}/fullstory"
fi
for platform in i386-efi x86_64-efi ; do
filename="bootx64"
[ "${platform}" = "i386-efi" ] && filename="bootia32"
[ -e /usr/lib/grub/${platform} ] && grub-mkstandalone \
-o ${beeb}/${filename}.efi --compress=xz -O ${platform} \
/boot/grub/grub.cfg=/boot/grub/grub.cfg.new 2>&1 > /dev/null
done

View File

@@ -4,15 +4,15 @@ jwm:jwm
i3:i3 i3:i3
fluxbox:startfluxbox fluxbox:startfluxbox
pekwm:pekwm pekwm:pekwm
plasma:startkde
gnome:gnome-session
xfce:startxfce4
cinnamon:cinnamon-session-cinnamon
mate:mate-session
enlightenment:enlightenment_start enlightenment:enlightenment_start
Lumina-DE:start-lumina-desktop
LXDE:lxsession LXDE:lxsession
plasma:startplasma-x11
lxqt:lxqt-session lxqt:lxqt-session
pantheon:pantheon-session pantheon:pantheon-session
budgie-desktop:budgie-desktop budgie-desktop:budgie-desktop
deepin:startdde deepin:startdde
Lumina-DE:start-lumina-desktop mate:mate-session
cinnamon:cinnamon-session-cinnamon
xfce:startxfce4
gnome:gnome-session

4
data/dinit/artix-live Normal file
View File

@@ -0,0 +1,4 @@
type = scripted
command = /usr/bin/artix-live
restart = false
waits-for = setup

5
data/dinit/pacman-init Normal file
View File

@@ -0,0 +1,5 @@
type = scripted
command = /etc/dinit.d/scripts/pacman-init
stop-command = /usr/bin/umount -l /etc/pacman.d/gnupg
restart = false
waits-for = setup

View File

@@ -0,0 +1,4 @@
#!/bin/sh
/usr/bin/mount -t tmpfs -o size=10M,mode=0755 tmpfs /etc/pacman.d/gnupg
/usr/bin/pacman-key --init
/usr/bin/pacman-key --populate artix

View File

@@ -1,15 +0,0 @@
# Defaults for grub2-portable-efi update-grub helper
# sourced by grub2's update-grub
# installed at /etc/default/grub2-portable-efi by the maintainer scripts
#
# This is a POSIX shell fragment
#
# specify is this should be disabled (set to "disable")
# default:
#AT_EFI_STANDALONE=""
# specify where to install the portable efi
# default: /boot/efi/EFI/BOOT
#AT_EFI_PORTABLE_PATH="/boot/efi/EFI/BOOT"

View File

@@ -3,18 +3,5 @@
# autologin # autologin
AUTOLOGIN=true AUTOLOGIN=true
# live username
USER_NAME=artix
# live password # live password
PASSWORD=artix PASSWORD=artix
# live group membership
ADDGROUPS='video,power,disk,storage,optical,network,lp,scanner,wheel'
# default desktop file
DEFAULT_DESKTOP_FILE=lxqt
# default desktop executable
DEFAULT_DESKTOP_EXECUTABLE=lxqt-session

View File

@@ -1,15 +1,17 @@
#!/usr/bin/openrc-run #!/usr/bin/openrc-run
# Copyright 2014 Aaditya Bagga (aaditya_gnulinux@zoho.com) # Copyright 2014 Aaditya Bagga (aaditya_gnulinux@zoho.com)
# Copyright 2017-2021 The Artix Linux developers
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
description="LiveMedia Config Script" description="LiveMedia Config Script"
depend() { depend() {
need localmount need localmount
before display-manager ly
} }
start() { start() {
ebegin "Starting artix live script" ebegin "Starting artix live script"
/usr/bin/artix-live /usr/bin/artix-live
eend $? eend $?
} }

View File

@@ -1,5 +1,5 @@
#!/usr/bin/openrc-run #!/usr/bin/openrc-run
# Copyright 2015 artoo (artoo@cromnix.org) # Copyright 2019 artoo (artoo@artixlinux.org)
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
target_dir=/etc/pacman.d/gnupg target_dir=/etc/pacman.d/gnupg

View File

@@ -12,6 +12,6 @@ depend() {
start() { start() {
ebegin "Running pacman initialization" ebegin "Running pacman initialization"
/usr/bin/pacman-key --init &> /dev/null /usr/bin/pacman-key --init &> /dev/null
/usr/bin/pacman-key --populate archlinux artix &> /dev/null /usr/bin/pacman-key --populate artix &> /dev/null
eend $? eend $?
} }

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
. /usr/lib/rc/functions . @libdir@/rc/functions
case "$1" in case "$1" in
start) start)

View File

@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
mount -t tmpfs -o size=10M,mode=0755 tmpfs /etc/pacman.d/gnupg mount -t tmpfs -o size=10M,mode=0755 tmpfs /etc/pacman.d/gnupg
pacman-key --init 1>&2 pacman-key --init 1>&2
pacman-key --populate archlinux artix 1>&2 pacman-key --populate artix 1>&2
exec chpst -b pacman-init pause exec chpst -b pacman-init pause

View File

@@ -0,0 +1 @@
oneshot

2
data/s6/artix-live/up.in Normal file
View File

@@ -0,0 +1,2 @@
#!@bindir@/execlineb -P
exec @bindir@/artix-live

View File

View File

View File

@@ -0,0 +1,2 @@
#!@bindir@/execlineb -P
umount -l /etc/pacman.d/gnupg

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1,5 @@
#!@bindir@/execlineb -P
foreground { mkdir -p /etc/pacman.d/gnupg }
foreground { mount -t tmpfs -o size=10M,mode=0755 tmpfs /etc/pacman.d/gnupg }
foreground { pacman-key --init }
foreground { pacman-key --populate artix }

12
data/sysusers.in Normal file
View File

@@ -0,0 +1,12 @@
# artix live user
u @live@ 1000 - /home/@live@ /bin/bash
m @live@ video
m @live@ power
m @live@ cdrom
m @live@ network
m @live@ lp
m @live@ scanner
m @live@ wheel
m @live@ log
m @live@ users

View File

@@ -1,19 +1,15 @@
#!/bin/bash #!/hint/bash
#
# This program is free software; you can redistribute it and/or modify export LC_MESSAGES=C
# it under the terms of the GNU General Public License as published by export LANG=C
# the Free Software Foundation; version 2 of the License.
# # {{{ functions
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
kernel_cmdline(){ kernel_cmdline(){
for param in $(cat /proc/cmdline); do for param in $(cat /proc/cmdline); do
case "${param}" in case "${param}" in
$1=*) echo "${param##*=}"; return 0 ;; $1=*) echo "${param##*=}"; return 0 ;;
$1) return 0 ;; "$1") return 0 ;;
*) continue ;; *) continue ;;
esac esac
done done
@@ -22,169 +18,115 @@ kernel_cmdline(){
} }
get_lang(){ get_lang(){
echo $(kernel_cmdline lang) kernel_cmdline lang
} }
get_keytable(){ get_keytable(){
echo $(kernel_cmdline keytable) kernel_cmdline keytable
} }
get_tz(){ get_tz(){
echo $(kernel_cmdline tz) kernel_cmdline tz
}
get_cal_mode(){
echo $(kernel_cmdline netinstall)
}
get_timer_ms(){
echo $(date +%s%3N)
}
# $1: start timer
elapsed_time_ms(){
echo $(echo $1 $(get_timer_ms) | awk '{ printf "%0.3f",($2-$1)/1000 }')
}
load_live_config(){
[[ -f $1 ]] || return 1
local live_conf="$1"
[[ -r ${live_conf} ]] && source ${live_conf}
[[ -z ${AUTOLOGIN} ]] && AUTOLOGIN=true
[[ -z ${USER_NAME} ]] && USER_NAME="artix"
[[ -z ${PASSWORD} ]] && PASSWORD="artix"
[[ -z ${ADDGROUPS} ]] && ADDGROUPS="video,power,storage,optical,network,lp,scanner,wheel,users,audio"
echo "Loaded ${live_conf}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
return 0
} }
is_valid_de(){ is_valid_de(){
if [[ ${DEFAULT_DESKTOP_EXECUTABLE} != "none" ]] && \ if [[ ${DEFAULT_DESKTOP_EXECUTABLE} != "none" ]] && \
[[ ${DEFAULT_DESKTOP_FILE} != "none" ]]; then [[ ${DEFAULT_DESKTOP_FILE} != "none" ]]; then
return 0 return 0
else
return 1
fi fi
} return 1
load_desktop_map(){
local _space="s| ||g" _clean=':a;N;$!ba;s/\n/ /g' _com_rm="s|#.*||g" \
file=${DATADIR}/desktop.map
local desktop_map=$(sed "$_com_rm" "$file" | sed "$_space" | sed "$_clean")
echo ${desktop_map}
} }
detect_desktop_env(){ detect_desktop_env(){
local xs=/usr/share/xsessions ex=/usr/bin key val map=( $(load_desktop_map) ) local key val map
map="${DATADIR}"/artools/desktop.map
DEFAULT_DESKTOP_FILE="none" DEFAULT_DESKTOP_FILE="none"
DEFAULT_DESKTOP_EXECUTABLE="none" DEFAULT_DESKTOP_EXECUTABLE="none"
for item in "${map[@]}";do while read -r item; do
key=${item%:*} key=${item%:*}
val=${item#*:} val=${item#*:}
if [[ -f $xs/$key.desktop ]] && [[ -f $ex/$val ]];then if [[ -f "${DATADIR}"/xsessions/$key.desktop ]] && [[ -f ${BINDIR}/$val ]];then
DEFAULT_DESKTOP_FILE="$key" DEFAULT_DESKTOP_FILE="$key"
DEFAULT_DESKTOP_EXECUTABLE="$val" DEFAULT_DESKTOP_EXECUTABLE="$val"
fi fi
done done < "$map"
echo "Detected ${DEFAULT_DESKTOP_EXECUTABLE} ${DEFAULT_DESKTOP_FILE}" >> "${LOGFILE}"
} }
configure_accountsservice(){ configure_accountsservice(){
local path=/var/lib/AccountsService/users local path=/var/lib/AccountsService/users user="${1:-${LIVEUSER}}"
if [ -d "${path}" ] ; then if [ -d "${path}" ] ; then
echo "[User]" > ${path}/$1 echo "[User]" > ${path}/"$user"
echo "XSession=${DEFAULT_DESKTOP_FILE}" >> ${path}/$1 echo "XSession=${DEFAULT_DESKTOP_FILE}" >> ${path}/"$user"
if [[ -f "/var/lib/AccountsService/icons/$1.png" ]];then if [[ -f "/var/lib/AccountsService/icons/$user.png" ]];then
echo "Icon=/var/lib/AccountsService/icons/$1.png" >> ${path}/$1 echo "Icon=/var/lib/AccountsService/icons/$user.png" >> ${path}/"$user"
fi fi
fi fi
echo "Configured accountsservice" >> "${LOGFILE}"
} }
set_lightdm_greeter(){ set_lightdm_greeter(){
local greeters=$(ls /usr/share/xgreeters/*greeter.desktop) name local name
for g in ${greeters[@]};do for g in "${DATADIR}"/xgreeters/*.desktop;do
name=${g##*/} name=${g##*/}
name=${name%%.*} name=${name%%.*}
case ${name} in case ${name} in
lightdm-gtk-greeter) break ;; lightdm-gtk-greeter) break ;;
lightdm-*-greeter) lightdm-*-greeter)
sed -i -e "s/^.*greeter-session=.*/greeter-session=${name}/" /etc/lightdm/lightdm.conf sed -e "s/^.*greeter-session=.*/greeter-session=${name}/" \
-i /etc/lightdm/lightdm.conf
;; ;;
esac esac
done done
} }
set_lightdm_vt(){
sed -i -e 's/^.*minimum-vt=.*/minimum-vt=7/' /etc/lightdm/lightdm.conf
}
configure_displaymanager(){ configure_displaymanager(){
# Try to detect desktop environment # Try to detect desktop environment
# Configure display manager # Configure display manager
if [[ -f /usr/bin/lightdm ]];then
if [[ -f "${BINDIR}"/lightdm ]];then
groupadd -r autologin groupadd -r autologin
set_lightdm_vt gpasswd -a "${LIVEUSER}" autologin &> /dev/null
set_lightdm_greeter set_lightdm_greeter
if $(is_valid_de); then if is_valid_de; then
sed -i -e "s/^.*user-session=.*/user-session=$DEFAULT_DESKTOP_FILE/" /etc/lightdm/lightdm.conf sed -e "s/^.*user-session=.*/user-session=$DEFAULT_DESKTOP_FILE/" \
-e 's/^.*minimum-vt=.*/minimum-vt=7/' \
-i /etc/lightdm/lightdm.conf
fi fi
if ${AUTOLOGIN};then ${AUTOLOGIN} && sed -e "s/^.*autologin-user=.*/autologin-user=${LIVEUSER}/" \
gpasswd -a ${USER_NAME} autologin &> /dev/null -e "s/^.*autologin-user-timeout=.*/autologin-user-timeout=0/" \
sed -i -e "s/^.*autologin-user=.*/autologin-user=${USER_NAME}/" /etc/lightdm/lightdm.conf -e "s/^.*pam-autologin-service=.*/pam-autologin-service=lightdm-autologin/" \
sed -i -e "s/^.*autologin-user-timeout=.*/autologin-user-timeout=0/" /etc/lightdm/lightdm.conf -i /etc/lightdm/lightdm.conf
sed -i -e "s/^.*pam-autologin-service=.*/pam-autologin-service=lightdm-autologin/" /etc/lightdm/lightdm.conf elif [[ -f "${BINDIR}"/gdm ]];then
fi
elif [[ -f /usr/bin/gdm ]];then
configure_accountsservice "gdm" configure_accountsservice "gdm"
if ${AUTOLOGIN};then ${AUTOLOGIN} && sed -e "s/\[daemon\]/\[daemon\]\nAutomaticLogin=${LIVEUSER}\nAutomaticLoginEnable=True/" \
sed -i -e "s/\[daemon\]/\[daemon\]\nAutomaticLogin=${USER_NAME}\nAutomaticLoginEnable=True/" /etc/gdm/custom.conf -i /etc/gdm/custom.conf
elif [[ -f "${BINDIR}"/sddm ]];then
if is_valid_de; then
sed -e "s|^Session=.*|Session=$DEFAULT_DESKTOP_FILE.desktop|" \
-i /etc/sddm.conf
fi fi
elif [[ -f /usr/bin/sddm ]];then ${AUTOLOGIN} && sed -e "s|^User=.*|User=${LIVEUSER}|" \
if $(is_valid_de); then -i /etc/sddm.conf
sed -i -e "s|^Session=.*|Session=$DEFAULT_DESKTOP_FILE.desktop|" /etc/sddm.conf elif [[ -f "${BINDIR}"/lxdm ]];then
fi if is_valid_de; then
if ${AUTOLOGIN};then sed -e "s|^.*session=.*|session=${BINDIR}/${DEFAULT_DESKTOP_EXECUTABLE}|" \
sed -i -e "s|^User=.*|User=${USER_NAME}|" /etc/sddm.conf -i /etc/lxdm/lxdm.conf
fi
elif [[ -f /usr/bin/lxdm ]];then
if $(is_valid_de); then
sed -i -e "s|^.*session=.*|session=/usr/bin/${DEFAULT_DESKTOP_EXECUTABLE}|" /etc/lxdm/lxdm.conf
fi
if ${AUTOLOGIN};then
sed -i -e "s/^.*autologin=.*/autologin=${USER_NAME}/" /etc/lxdm/lxdm.conf
fi fi
${AUTOLOGIN} && sed -e "s/^.*autologin=.*/autologin=${LIVEUSER}/" \
-i /etc/lxdm/lxdm.conf
fi fi
} echo "Configured displaymanager" >> "${LOGFILE}"
gen_pw(){
echo $(perl -e 'print crypt($ARGV[0], "password")' ${PASSWORD})
}
configure_user(){
# set up user and password
if [[ -n ${PASSWORD} ]];then
useradd -m -G ${ADDGROUPS} -p $(gen_pw) -s /bin/bash ${USER_NAME}
else
useradd -m -G ${ADDGROUPS} -s /bin/bash ${USER_NAME}
fi
} }
find_legacy_keymap(){ find_legacy_keymap(){
local file="${DATADIR}/kbd-model.map" kt="$1" local file="${DATADIR}/artools/kbd-model.map" kt="$1"
while read -r line || [[ -n $line ]]; do while read -r line || [[ -n $line ]]; do
if [[ -z $line ]] || [[ $line == \#* ]]; then if [[ -z $line ]] || [[ $line == \#* ]]; then
continue continue
fi fi
local mapping=( $line ); # parses columns local mapping=( "$line" ); # parses columns
if [[ ${#mapping[@]} != 5 ]]; then if [[ ${#mapping[@]} != 5 ]]; then
continue continue
fi fi
@@ -193,14 +135,14 @@ find_legacy_keymap(){
continue continue
fi fi
if [[ "${mapping[3]}" = "-" ]]; then if [[ "${mapping[3]}" == "-" ]]; then
mapping[3]="" mapping[3]=""
fi fi
X11_LAYOUT=${mapping[1]} X11_LAYOUT=${mapping[1]}
X11_MODEL=${mapping[2]} X11_MODEL=${mapping[2]}
X11_VARIANT=${mapping[3]} X11_VARIANT=${mapping[3]}
x11_OPTIONS=${mapping[4]} X11_OPTIONS=${mapping[4]}
done < $file done < $file
} }
@@ -226,57 +168,92 @@ write_x11_config(){
local XORGKBLAYOUT="/etc/X11/xorg.conf.d/00-keyboard.conf" local XORGKBLAYOUT="/etc/X11/xorg.conf.d/00-keyboard.conf"
echo "" >> "$XORGKBLAYOUT"
echo "Section \"InputClass\"" > "$XORGKBLAYOUT" echo "Section \"InputClass\"" > "$XORGKBLAYOUT"
echo " Identifier \"system-keyboard\"" >> "$XORGKBLAYOUT" {
echo " MatchIsKeyboard \"on\"" >> "$XORGKBLAYOUT" echo " Identifier \"system-keyboard\""
echo " Option \"XkbLayout\" \"$X11_LAYOUT\"" >> "$XORGKBLAYOUT" echo " MatchIsKeyboard \"on\""
echo " Option \"XkbModel\" \"$X11_MODEL\"" >> "$XORGKBLAYOUT" echo " Option \"XkbLayout\" \"$X11_LAYOUT\""
echo " Option \"XkbVariant\" \"$X11_VARIANT\"" >> "$XORGKBLAYOUT" echo " Option \"XkbModel\" \"$X11_MODEL\""
echo " Option \"XkbOptions\" \"$X11_OPTIONS\"" >> "$XORGKBLAYOUT" echo " Option \"XkbVariant\" \"$X11_VARIANT\""
echo "EndSection" >> "$XORGKBLAYOUT" echo " Option \"XkbOptions\" \"$X11_OPTIONS\""
echo "EndSection"
} >> "$XORGKBLAYOUT"
} }
configure_language(){ configure_language(){
# hack to be able to set the locale on bootup # hack to be able to set the locale on bootup
local lang=$(get_lang) local lang keytable timezone
local keytable=$(get_keytable) lang=$(get_lang)
local timezone=$(get_tz) keytable=$(get_keytable)
# Fallback timezone=$(get_tz)
# [[ -z "${lang}" ]] && lang="en_US"
# [[ -z "${keytable}" ]] && keytable="us"
# [[ -z "${timezone}" ]] && timezone="Etc/UTC"
sed -e "s/#${lang}.UTF-8/${lang}.UTF-8/" -i /etc/locale.gen sed -e "s/#${lang}.UTF-8/${lang}.UTF-8/" -i /etc/locale.gen
# echo "LANG=${lang}.UTF-8" >> /etc/environment
if [[ -d /run/openrc ]]; then
sed -i "s/keymap=.*/keymap=\"${keytable}\"/" /etc/conf.d/keymaps
fi
echo "KEYMAP=${keytable}" > /etc/vconsole.conf echo "KEYMAP=${keytable}" > /etc/vconsole.conf
echo "LANG=${lang}.UTF-8" > /etc/locale.conf echo "LANG=${lang}.UTF-8" > /etc/locale.conf
ln -sf /usr/share/zoneinfo/${timezone} /etc/localtime ln -sf "${DATADIR}"/zoneinfo/"${timezone}" /etc/localtime
write_x11_config "${keytable}" write_x11_config "${keytable}"
loadkeys "${keytable}" loadkeys "${keytable}"
locale-gen ${lang} locale-gen "${lang}"
echo "Configured language: ${lang}" >> "${LOGFILE}" {
echo "Configured keymap: ${keytable}" >> "${LOGFILE}" echo "Configured language: ${lang}"
echo "Configured timezone: ${timezone}" >> "${LOGFILE}" echo "Configured keymap: ${keytable}"
echo "Configured timezone: ${timezone}"
echo "Finished localization"
} >> "${LOGFILE}"
} }
configure_swap(){ configure_swap(){
local swapdev="$(fdisk -l 2>/dev/null | grep swap | cut -d' ' -f1)" local swapdev
swapdev="$(fdisk -l 2>/dev/null | grep swap | cut -d' ' -f1)"
if [ -e "${swapdev}" ]; then if [ -e "${swapdev}" ]; then
swapon ${swapdev} swapon "${swapdev}"
fi
echo "Activated swap and added to fstab" >> "${LOGFILE}"
}
configure_branding(){
if [[ -f "${BINDIR}"/neofetch ]]; then
neofetch >| /etc/issue
echo "Configured branding" >> "${LOGFILE}"
fi fi
} }
configure_user_root(){ configure_user(){
# set up root password echo "root:${PASSWORD}" | chroot / chpasswd
echo "root:${PASSWORD}" | chroot $1 chpasswd
cp /etc/skel/.{bash_profile,bashrc,bash_logout} /root/ cp /etc/skel/.{bash_profile,bashrc,bash_logout} /root/
mkdir /home/${LIVEUSER}
chown ${LIVEUSER}:${LIVEUSER} /home/${LIVEUSER}
echo "${LIVEUSER}:${PASSWORD}" | chroot / chpasswd
cp -r /etc/skel/.[^.]* /home/${LIVEUSER}
chown -R ${LIVEUSER}:${LIVEUSER} /home/${LIVEUSER}
echo "Configured live user ${LIVEUSER} with password ${PASSWORD}" >> "${LOGFILE}"
} }
# }}}
load_live_config(){
[[ -f $1 ]] || return 1
local live_conf="$1"
[[ -r "${live_conf}" ]] && source "${live_conf}"
AUTOLOGIN=${AUTOLOGIN:-true}
PASSWORD=${PASSWORD:-artix}
return 0
}
load_live_config "@sysconfdir@/artools/live.conf" || load_live_config "@datadir@/artools/live.conf"
LIVEUSER=@live@
DATADIR=@datadir@
BINDIR=@bindir@

View File

@@ -0,0 +1,12 @@
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = artix-live-s6
Target = artix-live-suite66
[Action]
Description = Enabling live services ...
When = PostTransaction
Exec = /usr/share/libalpm/scripts/liveservices-hook enable
NeedsTargets

View File

@@ -0,0 +1,11 @@
[Trigger]
Operation = Remove
Type = Package
Target = artix-live-s6
Target = artix-live-suite66
[Action]
Description = Disabling live services ...
When = PreTransaction
Exec = /usr/share/libalpm/scripts/liveservices-hook disable
NeedsTargets

View File

@@ -0,0 +1,88 @@
#!/bin/sh -e
# Only needed for s6 and suite66.
s6_enable_live_services(){
if [ -d /etc/s6/sv/gdm/dependencies.d ]; then
touch /etc/s6/sv/gdm/dependencies.d/artix-live
fi
if [ -d /etc/s6/sv/lightdm-srv/dependencies.d ]; then
touch /etc/s6/sv/lightdm-srv/dependencies.d/artix-live
fi
if [ -d /etc/s6/sv/sddm/dependencies.d ]; then
touch /etc/s6/sv/sddm/dependencies.d/artix-live
fi
}
s6_disable_live_services(){
rm -f /etc/s6/sv/gdm/dependencies.d/artix-live
rm -f /etc/s6/sv/lightdm-srv/dependencies.d/artix-live
rm -f /etc/s6/sv/sddm/dependencies.d/artix-live
}
suite66_enable_live_services(){
[ -d /var/lib/66/system/boot ] || 66-tree -n boot
[ -d /var/lib/66/system/default ] || 66-tree -ncE default
66-enable -t default artix-live pacman-init
if [ -f /usr/bin/gdm ]; then
66-disable -t default logind gdm
sed -i -E 's#@depends\s*=\s*\(\s*([^)]+)\s*\)#@depends = ( \1artix-live pacman-init )#' /etc/66/service/gdm
66-enable -t default logind gdm
elif [ -f /usr/bin/lightdm ]; then
66-disable -t default logind lightdm
sed -i -E 's#@depends\s*=\s*\(\s*([^)]+)\s*\)#@depends = ( \1artix-live pacman-init )#' /etc/66/service/lightdm
66-enable -t default logind lightdm
elif [ -f /usr/bin/sddm ]; then
66-disable -t default logind sddm
sed -i -E 's#@depends\s*=\s*\(\s*([^)]+)\s*\)#@depends = ( \1artix-live pacman-init )#' /etc/66/service/sddm
66-enable -t default logind sddm
fi
66-enable -t boot -F boot@system
}
suite66_disable_live_services(){
66-disable -t default artix-live pacman-init
if [ -f /usr/bin/gdm ]; then
66-disable -t default logind gdm
sed -i -E 's# artix-live pacman-init##' /etc/66/service/gdm
66-enable -t default logind gdm
elif [ -f /usr/bin/lightdm ]; then
66-disable -t default logind lightdm
sed -i -E 's# artix-live pacman-init##' /etc/66/service/lightdm
66-enable -t default logind lightdm
elif [ -f /usr/bin/sddm ]; then
66-disable -t default logind sddm
sed -i -E 's# artix-live pacman-init##' /etc/66/service/sddm
66-enable -t default logind sddm
fi
66-enable -t boot -F boot@system
}
enable_live_services() {
if [ -f /usr/bin/s6-init ]; then
s6_enable_live_services
fi
if [ -f /usr/bin/suite66-init ]; then
suite66_enable_live_services
fi
}
disable_live_services() {
if [ -f /usr/bin/s6-init ]; then
s6_disable_live_services
fi
if [ -f /usr/bin/suite66-init ]; then
suite66_disable_live_services
fi
}
case "$1" in
enable) enable_live_services ;;
disable) disable_live_services ;;
*) echo >&2 " Invalid operation '$1'"; exit 1 ;;
esac