From cf2661a888cf8cd207b84564688661872d2dbb1f Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sat, 17 May 2014 13:22:57 -0400 Subject: [PATCH] added some sudos where they would be handy. --- customizing/fred/fred_common.alias | 2 +- scripts/system/check_mount.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/customizing/fred/fred_common.alias b/customizing/fred/fred_common.alias index ea832f20..ab75ffe6 100644 --- a/customizing/fred/fred_common.alias +++ b/customizing/fred/fred_common.alias @@ -4,7 +4,7 @@ # moo and unmoo mount the local folders i use most. alias moo='check_mount /z/stuffing ; check_mount /z/walrus ; check_mount /z/chunky ; check_mount /z/fredgrid' -alias unmoo='umount /z/stuffing ; umount /z/walrus ; umount /z/chunky ; umount /z/fredgrid' +alias unmoo='sudo umount /z/stuffing ; sudo umount /z/walrus ; sudo umount /z/chunky ; sudo umount /z/fredgrid' # cleans up the ownership for all my files. #moved alias refred='(chown -R fred:fred /home/fred /home/games /home/archives ; normal_perm /var/log )' diff --git a/scripts/system/check_mount.sh b/scripts/system/check_mount.sh index 889c9df3..281d52bd 100644 --- a/scripts/system/check_mount.sh +++ b/scripts/system/check_mount.sh @@ -1,4 +1,6 @@ #!/bin/bash +# check_mount: tests a mount point to see if it is already mounted, and if +# it is not, mounts it. if [ -z "$1" ]; then echo This program needs a mount point as a parameter. If the mount point is not echo already mounted, then the program will attempt to mount it. @@ -6,7 +8,7 @@ if [ -z "$1" ]; then fi if [ -z "$(mount | grep "$1")" ]; then - mount "$1" + sudo mount "$1" fi -- 2.34.1