From: Chris Koeritz Date: Sun, 12 Nov 2017 03:43:58 +0000 (-0500) Subject: hmmm, somehow not responding right X-Git-Tag: 2.140.98^2~27^2~3^2~1 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=3d2c6b4c346b3f35a3dea691f8ae0fb29550eb92 hmmm, somehow not responding right i cause a failure of first sudo, but the script does not stop. it just merrily goes to the next step. not cool. --- diff --git a/scripts/customize/fred/refred.sh b/scripts/customize/fred/refred.sh index 2f00854a..c99b2d11 100644 --- a/scripts/customize/fred/refred.sh +++ b/scripts/customize/fred/refred.sh @@ -19,30 +19,41 @@ function refred() # everything else is only re-permed if it exists. if [ ! -d "$DEFAULT_FEISTYMEOW_ORG_DIR" ]; then sudo mkdir "$DEFAULT_FEISTYMEOW_ORG_DIR" + test_or_die "making directory: $DEFAULT_FEISTYMEOW_ORG_DIR" fi # iterate across the list of dirs we want fred to own and change their ownership. for dirname in /home/fred $DEFAULT_FEISTYMEOW_ORG_DIR /usr/local/fred /home/games $arch_addin; do if [ -d "$dirname" ]; then echo "refred on '$dirname'" - sudo chown -R fred:fred $dirname + sudo chown -R fred:fred "$dirname" + test_or_die "chowning for fred: $dirname" fi done # special case for archives directory. if [ -d /z/stuffing -o -L /z/stuffing ]; then - sudo chown fred:fred /z; sudo chmod g+rx,o+rx /z - sudo chown fred:fred /z/stuffing; sudo chmod g+rx,o-rwx /z/stuffing + sudo chown fred:fred /z + test_or_die "chowning /z for fred" + sudo chmod g+rx,o+rx /z + test_or_die "chmodding /z/ for fred" + sudo chown fred:fred /z/stuffing + test_or_die "chowning /z/stuffing for fred" + sudo chmod g+rx,o-rwx /z/stuffing + test_or_die "chmodding /z/stuffing for fred" pushd /z/stuffing &>/dev/null if [ -d archives -o -L archives ]; then sudo chown fred:fred archives + test_or_die "chowning /z/stuffing/archives for fred" sudo chmod -R g+rwx archives + test_or_die "chmodding /z/stuffing/archives for fred" fi popd &>/dev/null fi # make the logs readable by normal humans. sudo bash $FEISTY_MEOW_SCRIPTS/security/normal_perm.sh /var/log + test_or_die "setting normal perms on /var/log" } # this block should execute when the script is actually run, rather @@ -50,6 +61,8 @@ function refred() if [[ $0 =~ .*refred\.sh.* ]]; then THISDIR="$( \cd "$(\dirname "$0")" && /bin/pwd )" source "$THISDIR/../../core/launch_feisty_meow.sh" + test_or_die "sourcing the feisty meow launcher" refred + test_or_die "refredding process" fi