Skip to content
Permalink
Browse files

Log patches during build, patch VM disk resize

  • Loading branch information...
NEMS Linux
NEMS Linux committed Apr 7, 2019
1 parent e89229e commit 246e0701b0560e9db81869e67dbcea654677053f
Showing with 32 additions and 5 deletions.
  1. +22 −0 build/998-patches
  2. +0 −2 build/999-cleanup
  3. +2 −2 nems-build.sh
  4. +7 −0 nems-cleanup.sh
  5. +1 −1 nems-upgrade/patches/000003
@@ -0,0 +1,22 @@
#!/bin/bash
echo $0 > /var/www/html/userfiles/nems-build.cur

# Add patches that are done during the build process, but won't be logged automatically

# Do not run this script manually!!!!!!

# This should only execute during an automatic build process, and should only include patches that are part of that build process

if ! grep -q "PATCH-000004" /var/log/nems/patches.log; then
echo "PATCH-000004" >> /var/log/nems/patches.log
fi

if ! grep -q "PATCH-000005" /var/log/nems/patches.log; then
echo "PATCH-000005" >> /var/log/nems/patches.log
fi






@@ -15,5 +15,3 @@
if [[ -e /var/www/html/userfiles/nems-build.cur ]]; then
rm /var/www/html/userfiles/nems-build.cur
fi


@@ -158,8 +158,8 @@ rm -f /etc/timezone
rm -f /etc/localtime
dpkg-reconfigure -f noninteractive tzdata

echo "Run manually parts"
exit
#echo "Run manually parts"
#exit

echo "------------------------------"
# Run the scripts in the build folder
@@ -235,6 +235,13 @@ nameserver 2001:4860:4860::8844
rm -rf /root/scripts
fi

if (( $platform == 20 )); then
# Virtual Appliance does not need to resize the filesystem
if ! grep -q "PATCH-000002" /var/log/nems/patches.log; then
echo "PATCH-000002" >> /var/log/nems/patches.log
fi
fi

if (( $platform >= 45 )) && (( $platform <= 49 )); then
# ROCK64 and ROCKPRO64
rm -rf /var/lib/rock64 # Ayufan's build places a file in that folder which stops it from resizing on boot
@@ -1,7 +1,7 @@
#!/bin/bash

if ! grep -q "PATCH-000003" /var/log/nems/patches.log; then
/root/nems/nems-admin/build/174-networkmanager && echo "PATCH-000003" >> /var/log/nems/patches.log
/root/nems/nems-admin/build/174-networkmanager && /root/nems/nems-admin/build/999-cleanup
else
echo "This patch is already applied."
fi

0 comments on commit 246e070

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