From: Chris Koeritz Date: Thu, 28 Nov 2013 01:05:30 +0000 (-0500) Subject: nice improvement, to move out the custom script so it can be run properly X-Git-Tag: 2.140.90~859 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=4808a5b08e7dcb7c42ddb3e7595e8282b1c4eeb1;p=feisty_meow.git nice improvement, to move out the custom script so it can be run properly by root. more sudo usage seems slightly safer. --- diff --git a/customizing/fred/fred_common.alias b/customizing/fred/fred_common.alias index c0997d66..ea832f20 100644 --- a/customizing/fred/fred_common.alias +++ b/customizing/fred/fred_common.alias @@ -7,7 +7,7 @@ alias moo='check_mount /z/stuffing ; check_mount /z/walrus ; check_mount /z/chun alias unmoo='umount /z/stuffing ; umount /z/walrus ; umount /z/chunky ; umount /z/fredgrid' # cleans up the ownership for all my files. -alias refred='(chown -R fred:fred /home/fred /home/games /home/archives ; normal_perm /var/log )' +#moved alias refred='(chown -R fred:fred /home/fred /home/games /home/archives ; normal_perm /var/log )' # load in the xsede build scripts. source "$FEISTY_MEOW_SCRIPTS/buildor/build_xsedes.sh" diff --git a/customizing/fred/refred.sh b/customizing/fred/refred.sh new file mode 100644 index 00000000..72579923 --- /dev/null +++ b/customizing/fred/refred.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# cleans up the ownership for all my files. +function refred() +{ + chown -R fred:fred /home/fred /home/games /home/archives + bash $FEISTY_MEOW_SCRIPTS/files/normal_perm.sh /var/log +} + +# this block should execute when the script is actually run, rather +# than when it's just being sourced. +if [[ $0 =~ .*refred\.sh.* ]]; then + THISDIR="$( \cd "$(\dirname "$0")" && \pwd )" + export LIGHTWEIGHT_INIT=true + source "$THISDIR/../../scripts/core/launch_feisty_meow.sh" + refred +fi +