Compare commits

..

No commits in common. "3035bd45046733a67b37eeb3cf476dda7e7a6113" and "782cabf5456531d330f8367a57ab4620a709249f" have entirely different histories.

3 changed files with 11 additions and 38 deletions

View File

@ -388,12 +388,6 @@ 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"
@ -417,35 +411,19 @@ for I in ${!SECTIONS[@]}; do
done
done
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
#TODO: auto-login root and run install stage 2
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..."
#TODO: make this work without user interaction
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
#

View File

@ -1,4 +1,2 @@
#!/usr/bin/env bash
#debugging
exec bash --norc --noprofile
exec bash

View File

@ -64,8 +64,5 @@ Stage 2:
-> run passwd (interactively)
-> add to groups
-> 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
-> rm -r /opt/void-usb/installer