reintroduce firstboot as init script

main^2
josch 14 years ago
parent 43ed3ea239
commit 893e13cae9

@ -214,9 +214,20 @@ if $PYNEO; then
fi fi
# firstboot script # firstboot script
cat > $ROOTDIR/usr/sbin/firstboot.sh << __END__ cat > $ROOTDIR/etc/init.d/firstboot << __END__
#!/bin/sh #!/bin/sh -e
chmod -x /usr/sbin/firstboot.sh ### BEGIN INIT INFO
# Provides: firstboot
# Required-Start: \$all
# Required-Stop:
# Default-Start: S
# Default-Stop:
# X-Interactive: true
### END INIT INFO
update-rc.d -f firstboot remove
[ -d /home/persistent ] || mkdir /home/persistent [ -d /home/persistent ] || mkdir /home/persistent
print_exit_status () { print_exit_status () {
@ -374,18 +385,8 @@ print_yellow "finished running firstboot tasks!"
print_yellow "resuming normal boot..." print_yellow "resuming normal boot..."
sleep 3 sleep 3
__END__ __END__
chmod +x $ROOTDIR/usr/sbin/firstboot.sh chmod +x $ROOTDIR/etc/init.d/firstboot
chroot $ROOTDIR update-rc.d firstboot start 99 S
cat > $ROOTDIR/etc/rc.local << __END__
#!/bin/sh -e
if [ -x /usr/sbin/firstboot.sh ]; then
/usr/sbin/firstboot.sh
fi
exit 0
__END__
# cleanup # cleanup
chroot $ROOTDIR apt-get remove cdebootstrap-helper-rc.d xserver-xorg-input-synaptics xserver-xorg-input-wacom -qq chroot $ROOTDIR apt-get remove cdebootstrap-helper-rc.d xserver-xorg-input-synaptics xserver-xorg-input-wacom -qq

Loading…
Cancel
Save