Skip to content

Commit

Permalink
PATCH-000002 Improve first boot output
Browse files Browse the repository at this point in the history
  • Loading branch information
NEMS Linux committed Mar 16, 2019
1 parent bb11c0e commit e693405
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 1 deletion.
6 changes: 6 additions & 0 deletions nems-cleanup.sh
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions resize_rootfs/odroid-stage1
Expand Up @@ -33,5 +33,6 @@ EOF

do_resize
touch /forcefsck

sync
reboot
7 changes: 7 additions & 0 deletions resize_rootfs/odroid-stage2
Expand Up @@ -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
6 changes: 6 additions & 0 deletions resize_rootfs/pine64
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions resize_rootfs/raspi
Expand Up @@ -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
3 changes: 2 additions & 1 deletion resize_rootfs/rock64-stage1
Expand Up @@ -31,5 +31,6 @@ EOF
}

do_resize

sync
#reboot
reboot
10 changes: 10 additions & 0 deletions resize_rootfs/rock64-stage2
Expand Up @@ -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.