Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/bin/bashREMOUNT_DIR="/data"HELP_MSG="Please choose how to remount ${REMOUNT_DIR}: 'ro' or 'rw'."if [ -z "$1" ]; thenecho "${HELP_MSG}"exitfiif [ "ro" = "$1" ]; thenecho "Remounting ${REMOUNT_DIR} read-only"sudo mount -o remount,ro "${REMOUNT_DIR}"exitfiif [ "rw" = "$1" ]; thenecho "Remounting ${REMOUNT_DIR} read-write"sudo mount -o remount,rw "${REMOUNT_DIR}"exitfiecho "${HELP_MSG}"