2013-02-15 18:47:13 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
2013-02-25 01:27:15 +01:00
|
|
|
#set -x
|
2013-02-15 18:47:13 +01:00
|
|
|
|
2013-02-17 02:16:55 +01:00
|
|
|
source ./constraint.sh
|
|
|
|
|
|
|
|
if [ ${ID} -ne 0 ]; then
|
|
|
|
echo "This script has to be run as root."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
clean(){
|
|
|
|
echo Done, cleaning.
|
2013-03-28 18:04:29 +01:00
|
|
|
#mount -o remount,rw /
|
2013-02-17 02:16:55 +01:00
|
|
|
${SYNC}
|
|
|
|
}
|
|
|
|
|
|
|
|
trap clean EXIT TERM INT
|
|
|
|
|
|
|
|
# Remount the root filesystem in RO mode
|
2013-03-28 18:04:29 +01:00
|
|
|
#mount -o remount,ro /
|
|
|
|
|
2013-06-06 16:26:23 +02:00
|
|
|
chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/
|
2013-02-15 18:47:13 +01:00
|
|
|
|
2013-06-06 16:26:23 +02:00
|
|
|
su ${USERNAME} -c ./groomer.sh
|
2013-02-15 18:47:13 +01:00
|
|
|
|
|
|
|
|