remount optional
This commit is contained in:
parent
ec774af02e
commit
e567b44c47
@ -65,17 +65,22 @@ source /etc/remote-backup.conf
|
||||
# ------------- the script itself --------------------------------------
|
||||
|
||||
# make sure we're running as root
|
||||
if (( `$ID -u` != 0 )); then { $ECHO "Sorry, must be root. Exiting..."; exit; } fi
|
||||
if [ ! $UID -eq 0 ]
|
||||
then
|
||||
$ECHO "Sorry, must be root. Exiting..."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ "$REMOUNT" == "true" ]]
|
||||
then
|
||||
# attempt to remount the RW mount point as RW; else abort
|
||||
$MOUNT -o remount,rw $MOUNT_DEVICE $SNAPSHOT_RW ;
|
||||
if (( $? )); then
|
||||
{
|
||||
$ECHO "snapshot: could not remount $SNAPSHOT_RW readwrite";
|
||||
exit;
|
||||
}
|
||||
fi;
|
||||
|
||||
if (( $? ))
|
||||
then
|
||||
$ECHO "snapshot: could not remount $SNAPSHOT_RW readwrite"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
# rotating snapshots of /home (fixme: this should be more general)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user