Skip to content
Permalink
Browse files

PATCH-000002 Improve first boot output

  • Loading branch information...
NEMS Linux
NEMS Linux committed Mar 16, 2019
1 parent bb11c0e commit e6934055a5241fa6a93cedf098471119c5e6e415
@@ -264,6 +264,12 @@ nameserver 2001:4860:4860::8844
# This script removes any MOTD that were added during installs (annoying!)
/root/nems/nems-admin/build/230-motd

# Clear patches.log
if [[ -e /var/log/nems/patches.log ]]; then
rm /var/log/nems/patches.log
fi
touch /var/log/nems/patches.log

# Cleanup lingering logs and so-on
/root/nems/nems-admin/build/999-cleanup

@@ -33,5 +33,6 @@ EOF

do_resize
touch /forcefsck

sync
reboot
@@ -17,5 +17,12 @@ echo "Done" >> $rslog
df -h / >> $rslog
# Force FSCK to run at next boot just for good measure
touch /forcefsck

# Log that patch (resize) has been applied to this system
# Activates features such as bootscreen.sh
if ! grep -q "PATCH-000002" /var/log/nems/patches.log; then
echo "PATCH-000002" >> /var/log/nems/patches.log
fi

sync
reboot
@@ -45,6 +45,12 @@ EOF

resize

# Log that patch (resize) has been applied to this system
# Activates features such as bootscreen.sh
if ! grep -q "PATCH-000002" /var/log/nems/patches.log; then
echo "PATCH-000002" >> /var/log/nems/patches.log
fi

echo "Done!"

sed -i "s,/root/nems/nems-admin/resize_rootfs/pine64,,g" /etc/rc.local
@@ -8,4 +8,11 @@ fi

/bin/sed -i~ '/\/root\/nems\/nems-admin\/resize_rootfs\/raspi/d' /etc/rc.local

# Log that patch (resize) has been applied to this system
# Activates features such as bootscreen.sh
if ! grep -q "PATCH-000002" /var/log/nems/patches.log; then
echo "PATCH-000002" >> /var/log/nems/patches.log
fi

sync
reboot
@@ -31,5 +31,6 @@ EOF
}

do_resize

sync
#reboot
reboot
@@ -5,3 +5,13 @@ PLATFORM=rock64 # Must match the filename $PLATFORM-stage#

/sbin/resize2fs /dev/${BOOTDEVICE}p${PARTITION}
sed -i "s,/root/nems/nems-admin/resize_rootfs/"'${PLATFORM}'"-stage2,,g" /etc/rc.local

# Log that patch (resize) has been applied to this system
# Activates features such as bootscreen.sh
if ! grep -q "PATCH-000002" /var/log/nems/patches.log; then
echo "PATCH-000002" >> /var/log/nems/patches.log
fi

# Is reboot needed on this platform? Do it anyways until can test.
sync
reboot

0 comments on commit e693405

Please sign in to comment.
You can’t perform that action at this time.