aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-04-18 22:36:03 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-04-18 22:36:03 -0300
commit2f6d565e44983b89853fbcdd51e4cce828af0ad5 (patch)
treeb37c6739a0301b9a87c4740efd8d7740714847d1
parent9db66cf8a336b080677c4b119d5c83f79e8d7329 (diff)
downloadpuppet-backup-2f6d565e44983b89853fbcdd51e4cce828af0ad5.tar.gz
puppet-backup-2f6d565e44983b89853fbcdd51e4cce828af0ad5.tar.bz2
Sync-media cannot run as root
-rw-r--r--files/sync-media3
1 files changed, 3 insertions, 0 deletions
diff --git a/files/sync-media b/files/sync-media
index 331294f..524517d 100644
--- a/files/sync-media
+++ b/files/sync-media
@@ -52,6 +52,9 @@ function sync_media_add {
# Set sudo config
if [ "$WHOAMI" != 'root' ]; then
sudo="sudo"
+else
+ echo "Sorry, cannot run as root"
+ exit 1
fi
# Set fsck config