10 Commits
0.3 ... 0.4.6.1

Author SHA1 Message Date
189ceeb7e7 Move pacman-init to a service on its own 2018-02-17 13:12:39 +07:00
9c6b20fea3 Fix typo 2018-02-17 12:00:58 +07:00
9a514cc3ca Add initial runit support for artix-live 2018-02-15 12:21:20 +07:00
udeved
4f3899f6c6 util-live: fix load_desktop_map() 2017-12-19 16:28:33 +01:00
udeved
0efd3bdfa9 rename unoack to netinstall kernel param; grub now has a selection menu entry 2017-12-19 15:30:46 +01:00
udeved
f5d07a597f util-live: fix unpackfs paths 2017-12-18 13:16:51 +01:00
udeved
c48893ded2 artix-live: add option to configure calamares with a unpack=yes/no kernel parameter 2017-12-14 20:28:10 +01:00
udeved
781f6de35a rm machine-id config 2017-10-02 09:24:47 +02:00
udeved
6131156806 reactivate machine-id config 2017-10-01 21:59:18 +02:00
udeved
c9fbed1f2d pacman-init: use artix keyring 2017-08-06 21:28:21 +02:00
6 changed files with 188 additions and 164 deletions

View File

@@ -17,13 +17,19 @@ RC = \
data/rc/pacman-init \
data/rc/artix-live
RUNIT_CORE = \
data/runit/89-artix-live.sh
RUNIT_SV = \
data/runit/pacman-init.run
GRUB_DEFAULT = \
data/grub2-portable-efi
GRUB_D = \
data/99_zzz-portable-efi
all: $(BIN) $(RC) $(XBIN) ${GRUB_D}
all: $(BIN) $(RC) $(RUNIT_SV) $(XBIN) ${GRUB_D}
edit = sed -e "s|@datadir[@]|$(DESTDIR)$(PREFIX)/share/artools|g" \
-e "s|@sysconfdir[@]|$(DESTDIR)$(SYSCONFDIR)/artools|g" \
@@ -53,6 +59,12 @@ install_rc:
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/init.d
install -m0755 ${RC} $(DESTDIR)$(SYSCONFDIR)/init.d
install_runit:
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/runit/core-services
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/sv/pacman-init
install -m0755 ${RUNIT_CORE} $(DESTDIR)$(SYSCONFDIR)/runit/core-services
install -m0755 ${RUNIT_SV} $(DESTDIR)$(SYSCONFDIR)/sv/pacman-init/run
install_portable_efi:
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/default
install -m0755 $(GRUB_DEFAULT) $(DESTDIR)$(SYSCONFDIR)/default
@@ -72,9 +84,12 @@ uninstall_portable_efi:
uninstall_rc:
for f in ${RC}; do rm -f $(DESTDIR)$(SYSCONFDIR)/init.d/$$f; done
uninstall_runit:
for f in ${RUNIT_SV}; do rm -f $(DESTDIR)$(SYSCONFDIR)/runit/sv/$$f; done
install: install_base install_rc install_portable_efi
uninstall: uninstall_base uninstall_rc uninstall_portable_efi
uninstall: uninstall_base uninstall_rc uninstall_runit uninstall_portable_efi
dist:
git archive --format=tar --prefix=live-services-$(Version)/ $(Version) | gzip -9 > live-services-$(Version).tar.gz

View File

@@ -53,6 +53,10 @@ livetimer=$(get_timer_ms)
configure_displaymanager
echo "Configured displaymanager: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
livetimer=$(get_timer_ms)
configure_calamares
echo "Configured calamares netinstall ${netinstall} $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
livetimer=$(get_timer_ms)
configure_user_root /
echo "Configured root user: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"

View File

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

View File

@@ -0,0 +1,2 @@
msg "Initializing artix-live script"
artix-live

View File

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

View File

@@ -33,6 +33,10 @@ get_tz(){
echo $(kernel_cmdline tz)
}
get_cal_mode(){
echo $(kernel_cmdline netinstall)
}
get_timer_ms(){
echo $(date +%s%3N)
}
@@ -52,11 +56,11 @@ load_live_config(){
[[ -z ${autologin} ]] && autologin=true
[[ -z ${username} ]] && username="cromnix"
[[ -z ${username} ]] && username="artix"
[[ -z ${password} ]] && password="cromnix"
[[ -z ${password} ]] && password="artix"
[[ -z ${addgroups} ]] && addgroups=""
[[ -z ${addgroups} ]] && addgroups="video,power,storage,optical,network,lp,scanner,wheel,users,audio"
echo "Loaded ${live_conf}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
@@ -75,9 +79,7 @@ is_valid_de(){
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")
local desktop_map=$(sed "$_com_rm" "$file" | sed "$_space" | sed "$_clean")
echo ${desktop_map}
}
@@ -145,10 +147,6 @@ configure_displaymanager(){
if ${autologin};then
sed -i -e "s/\[daemon\]/\[daemon\]\nAutomaticLogin=${username}\nAutomaticLoginEnable=True/" /etc/gdm/custom.conf
fi
elif [[ -f /usr/bin/mdm ]];then
if $(is_valid_de); then
sed -i "s|default.desktop|$default_desktop_file.desktop|g" /etc/mdm/custom.conf
fi
elif [[ -f /usr/bin/sddm ]];then
if $(is_valid_de); then
sed -i -e "s|^Session=.*|Session=$default_desktop_file.desktop|" /etc/sddm.conf
@@ -269,17 +267,17 @@ configure_language(){
echo "Configured timezone: ${timezone}" >> "${LOGFILE}"
}
# configure_machine_id(){
# if [ -e "/etc/machine-id" ] ; then
# # delete existing machine-id
# echo "Deleting existing machine-id ..." >> "${LOGFILE}"
# rm /etc/machine-id
# fi
# # set unique machine-id
# echo "Setting machine-id ..." >> "${LOGFILE}"
# dbus-uuidgen --ensure=/etc/machine-id
# ln -sf /etc/machine-id /var/lib/dbus/machine-id
# }
configure_calamares(){
if [[ -f /usr/bin/calamares ]];then
netinstall=$(get_cal_mode)
if [[ "${netinstall}" == 'no' ]];then
sed -e "/- netinstall/d" \
-e "s|- chrootcfg|- unpackfs|" -i /etc/calamares/settings.conf
sed -e '$ d' -i /etc/calamares/modules/welcome.conf
fi
fi
}
configure_sudoers_d(){
echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/g_wheel