install stage 1: configure system to auto-login root and run install stage 2
parent
782cabf545
commit
14457b1168
|
@ -388,6 +388,12 @@ echo -n "Reconfiguring all installed packages... "
|
|||
run_in_target xbps-reconfigure -fa >> $LOGFILE 2>&1
|
||||
echo "done"
|
||||
|
||||
echo -n "Configuring runit to start some services... "
|
||||
run_in_target ln -s /etc/sv/acpid /etc/runit/runsvdir/default/
|
||||
run_in_target ln -s /etc/sv/dbus /etc/runit/runsvdir/default/
|
||||
run_in_target ln -s /etc/sv/NetworkManager /etc/runit/runsvdir/default/
|
||||
echo "done"
|
||||
|
||||
echo -n "Adding stage 2 installer... "
|
||||
|
||||
STAGE2_DIR="/mnt/target/opt/void-usb/installer"
|
||||
|
@ -411,7 +417,21 @@ for I in ${!SECTIONS[@]}; do
|
|||
done
|
||||
done
|
||||
|
||||
#TODO: auto-login root and run install stage 2
|
||||
mv /mnt/target/etc/sv/agetty-tty1/conf /mnt/target/etc/sv/agetty-tty1/conf.bak >> $LOGFILE 2>&1
|
||||
echo 'if [ -x /sbin/agetty -o -x /bin/agetty ]; then
|
||||
if [ "${tty}" = "tty1" ]; then
|
||||
GETTY_ARGS="--noclear --autologin root"
|
||||
fi
|
||||
fi' > /mnt/target/etc/sv/agetty-tty1/conf
|
||||
|
||||
[ -f /mnt/target/root/.profile ] && mv /mnt/target/root/.profile /mnt/target/root/.profile.bak >> $LOGFILE 2>&1
|
||||
echo "if ps aux | grep 'installer-stage2.sh' > /dev/null 2>&1; then
|
||||
true
|
||||
else
|
||||
/opt/void-usb/installer/install-stage2.sh
|
||||
exit
|
||||
fi" > /mnt/target/root/.profile
|
||||
|
||||
echo "done"
|
||||
|
||||
echo "Creating system image..."
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
exec bash
|
||||
|
||||
#debugging
|
||||
exec bash --norc --noprofile
|
||||
|
|
|
@ -64,5 +64,8 @@ Stage 2:
|
|||
-> run passwd (interactively)
|
||||
-> add to groups
|
||||
-> including sudo group
|
||||
-> build new squashfs image and reboot
|
||||
-> clean up
|
||||
-> mv /mnt/target/etc/sv/agetty-tty1/conf.bak /mnt/target/etc/sv/agetty-tty1/conf
|
||||
-> if [ -f /mnt/target/root/.profile.bak ]; then mv /mnt/target/root/.profile.bak /mnt/target/root/.profile; else rm /mnt/target/root/.profile; fi
|
||||
-> rm -r /opt/void-usb/installer
|
||||
-> build new squashfs image and reboot
|
||||
|
|
Loading…
Reference in New Issue