Compare commits
No commits in common. "3035bd45046733a67b37eeb3cf476dda7e7a6113" and "782cabf5456531d330f8367a57ab4620a709249f" have entirely different histories.
3035bd4504
...
782cabf545
|
@ -388,12 +388,6 @@ echo -n "Reconfiguring all installed packages... "
|
||||||
run_in_target xbps-reconfigure -fa >> $LOGFILE 2>&1
|
run_in_target xbps-reconfigure -fa >> $LOGFILE 2>&1
|
||||||
echo "done"
|
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... "
|
echo -n "Adding stage 2 installer... "
|
||||||
|
|
||||||
STAGE2_DIR="/mnt/target/opt/void-usb/installer"
|
STAGE2_DIR="/mnt/target/opt/void-usb/installer"
|
||||||
|
@ -417,35 +411,19 @@ for I in ${!SECTIONS[@]}; do
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
mv /mnt/target/etc/sv/agetty-tty1/conf /mnt/target/etc/sv/agetty-tty1/conf.bak >> $LOGFILE 2>&1
|
#TODO: auto-login root and run install stage 2
|
||||||
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 "done"
|
||||||
|
|
||||||
# This is not technically necessary, but it should help to save some memory.
|
|
||||||
# TODO: Be smart about this, run install stage 2 in chroot if there is enough free RAM
|
|
||||||
clear
|
|
||||||
echo "Stage 1 installation is now complete.
|
|
||||||
|
|
||||||
The freshly installed system needs to be booted to continue with stage 2 of the installation process.
|
|
||||||
The installer will now create a system image and reboot the computer.
|
|
||||||
"
|
|
||||||
press_any_key
|
|
||||||
|
|
||||||
echo "Creating system image..."
|
echo "Creating system image..."
|
||||||
#TODO: make this work without user interaction
|
#TODO: make this work without user interaction
|
||||||
run_in_target /opt/void-usb/backup-fs
|
run_in_target /opt/void-usb/backup-fs
|
||||||
|
|
||||||
|
clear
|
||||||
|
echo "Stage 1 installation is now complete.
|
||||||
|
|
||||||
|
The freshly installed system needs to be booted to continue with stage 2 of the installation process.
|
||||||
|
The installer will now reboot the computer.
|
||||||
|
"
|
||||||
|
press_any_key
|
||||||
reboot
|
reboot
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
exec bash
|
||||||
#debugging
|
|
||||||
exec bash --norc --noprofile
|
|
||||||
|
|
|
@ -64,8 +64,5 @@ Stage 2:
|
||||||
-> run passwd (interactively)
|
-> run passwd (interactively)
|
||||||
-> add to groups
|
-> add to groups
|
||||||
-> including sudo group
|
-> including sudo group
|
||||||
-> 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
|
-> build new squashfs image and reboot
|
||||||
|
-> rm -r /opt/void-usb/installer
|
||||||
|
|
Loading…
Reference in New Issue