working persistence

This commit is contained in:
ProgrammerIn-wonderland 2024-10-15 18:23:37 -04:00 committed by Eric Dubé
parent aae6fff340
commit f0b7214a07
2 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,8 @@
#!/bin/bash
PUTERUSERNAME=$( cat /proc/cmdline | sed -n 's/.*puterusername=\(.*\)/\1/p' )
echo > /tmp/restore-in-progress
touch /tmp/restore-in-progress
tar -C / -zxvf /puter/$PUTERUSERNAME/emulatorstate.apkovl.tar.gz # no worries if this errors, its just the first boot
apk add --no-cache $(cat /etc/apk/world)
rm /tmp/restore-in-progress
rm /tmp/restore-in-progress
touch /tmp/puter-restore-done

View File

@ -9,6 +9,7 @@ start() {
ip link set lo up
echo "nameserver 192.168.86.1" > /etc/resolv.conf
echo "puter.local" > /etc/hostname
puter-restore &
eend $?
}