Circlean/filesystem/opt/groomer/init.sh

29 lines
392 B
Bash
Raw Normal View History

2013-02-15 18:47:13 +01:00
#!/bin/bash
set -e
set -x
source ./constraint.sh
if [ ${ID} -ne 0 ]; then
echo "This script has to be run as root."
exit
fi
clean(){
echo Done, cleaning.
# Only if running on a rPi
# mount -o remount,rw /
${SYNC}
# shutdown -h now
}
trap clean EXIT TERM INT
# Remount the root filesystem in RO mode
# mount -o remount,ro /
2013-02-15 18:47:13 +01:00
su ${USERNAME} -c ./groomer.sh