4 DIR="/#SYSCONFDIR#/firststart.d"
5 DIR_OVERLAY_LOWER="/media/rfs/ro"
7 remove_startup_link () {
8 if [ -n "`which update-rc.d`" ]; then
9 update-rc.d -f firststart remove
13 if ! [ -d $DIR ]; then
18 # check if we have a ro overlay or if we can write changes directly
19 if [ -e "$DIR_OVERLAY_LOWER" ]; then
20 # using meta-readonly-rootfs-overlay
21 echo Mounting rootfs lower rw
22 mount $DIR_OVERLAY_LOWER -o remount,rw
24 echo Running write tasks...
27 rm -r $DIR_OVERLAY_LOWER/$DIR
28 rm $DIR_OVERLAY_LOWER/#SYSCONFDIR#/rc*.d/S*firststart
29 rm $DIR_OVERLAY_LOWER/#SYSCONFDIR#/init.d/firststart
31 echo Mounting rootfs lower ro
32 mount $DIR_OVERLAY_LOWER -o remount,ro > /dev/null 2>&1