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