Permalink
Browse files

Some lingering fi's

  • Loading branch information...
NEMS Linux
NEMS Linux committed Aug 28, 2018
1 parent cddb254 commit fa6a3266eaccb60b0e8bd8b4a74a45ae4465f8c4
Showing with 18 additions and 20 deletions.
  1. +18 −20 nems-cleanup.sh
@@ -225,29 +225,27 @@ nameserver 2001:4860:4860::8844
rm -rf /root/scripts
fi
if (( $platform == 43 )); then
# ROCK64
addition="/root/nems/nems-admin/resize_rootfs/rock64-stage1\n"
if grep -q "exit" /etc/rc.local; then
# This file contains an exit command, so make sure our new command comes before it
/bin/sed -i -- 's,exit,'"$addition"'exit,g' /etc/rc.local
else
# No exit command within the file, so just add it
echo "PLACEHERE" >> /etc/rc.local
/bin/sed -i -- 's,PLACEHERE,'"$addition"'exit 0,g' /etc/rc.local
fi
# ROCK64
addition="/root/nems/nems-admin/resize_rootfs/rock64-stage1\n"
if grep -q "exit" /etc/rc.local; then
# This file contains an exit command, so make sure our new command comes before it
/bin/sed -i -- 's,exit,'"$addition"'exit,g' /etc/rc.local
else
# No exit command within the file, so just add it
echo "PLACEHERE" >> /etc/rc.local
/bin/sed -i -- 's,PLACEHERE,'"$addition"'exit 0,g' /etc/rc.local
fi
fi
if (( $platform == 44 )); then
# PINE64
addition="/root/nems/nems-admin/resize_rootfs/pine64\n"
if grep -q "exit" /etc/rc.local; then
# This file contains an exit command, so make sure our new command comes before it
/bin/sed -i -- 's,exit,'"$addition"'exit,g' /etc/rc.local
else
# No exit command within the file, so just add it
echo "PLACEHERE" >> /etc/rc.local
/bin/sed -i -- 's,PLACEHERE,'"$addition"'exit 0,g' /etc/rc.local
fi
# PINE64
addition="/root/nems/nems-admin/resize_rootfs/pine64\n"
if grep -q "exit" /etc/rc.local; then
# This file contains an exit command, so make sure our new command comes before it
/bin/sed -i -- 's,exit,'"$addition"'exit,g' /etc/rc.local
else
# No exit command within the file, so just add it
echo "PLACEHERE" >> /etc/rc.local
/bin/sed -i -- 's,PLACEHERE,'"$addition"'exit 0,g' /etc/rc.local
fi
fi

0 comments on commit fa6a326

Please sign in to comment.