From: Chris Koeritz Date: Mon, 14 Jan 2019 03:59:58 +0000 (-0500) Subject: revised laxer response to synch errors X-Git-Tag: 2.140.115^2~64 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=727b1cbb41b65e7855c602c85dfb7f0ea2e7912c;p=feisty_meow.git revised laxer response to synch errors no point in blowing up the whole synch process if one simple error in one synch operation fails. this is not intended to operate in perfect evacuated lab environment. new alias for updating new little backup drive, slimpickenz. --- diff --git a/scripts/customize/fred/fred_common.alias b/scripts/customize/fred/fred_common.alias index 59c0c6bc..fc40f19e 100644 --- a/scripts/customize/fred/fred_common.alias +++ b/scripts/customize/fred/fred_common.alias @@ -16,6 +16,10 @@ define_yeti_alias update_fredmusicprime='source "$FEISTY_MEOW_SCRIPTS/archival/g # updates my little 1 TB "soapbox" style usb drive with any appropriate archives and source. define_yeti_alias update_soapbox='source "$FEISTY_MEOW_SCRIPTS/archival/general_updater.sh"; update_archive_drive "/media/fred/soapboxdrive"' +# does the updating thing on the new tiny flat drive that for a while was serving the ps4 shuttle service but now is an honest ext4 drive. +define_yeti_alias update_slimpickenz='source "$FEISTY_MEOW_SCRIPTS/archival/general_updater.sh"; update_archive_drive "/media/fred/slimpickenz"' + + # moo and unmoo mount the local folders i use most. #no longer used. we are doing mostly full directory stores without nfs mounts these days. #define_yeti_alias moo='check_mount /z/stuffing ; check_mount /z/walrus ; check_mount /z/chunky ; check_mount /z/fredgrid' diff --git a/scripts/customize/fred/scripts/refred.sh b/scripts/customize/fred/scripts/refred.sh index 65f9c35c..5f981d47 100644 --- a/scripts/customize/fred/scripts/refred.sh +++ b/scripts/customize/fred/scripts/refred.sh @@ -15,6 +15,6 @@ if [[ $0 =~ .*refred\.sh.* ]]; then source "$FEISTY_MEOW_SCRIPTS/security/cool_permissionator.sh" exit_on_error "sourcing the permission script" do_refred - exit_on_error "refredding process" + continue_on_error "refredding process" fi diff --git a/scripts/security/cool_permissionator.sh b/scripts/security/cool_permissionator.sh index e4f345c9..855511e6 100644 --- a/scripts/security/cool_permissionator.sh +++ b/scripts/security/cool_permissionator.sh @@ -27,7 +27,7 @@ function reapply_cool_permissions() # everything else is only re-permed if it exists. if [ ! -d "$DEFAULT_FEISTYMEOW_ORG_DIR" ]; then sudo mkdir "$DEFAULT_FEISTYMEOW_ORG_DIR" - exit_on_error "making directory: $DEFAULT_FEISTYMEOW_ORG_DIR" + continue_on_error "making directory: $DEFAULT_FEISTYMEOW_ORG_DIR" fi # fix some permissions for important security considerations. @@ -46,33 +46,33 @@ function reapply_cool_permissions() if [ -d "$dirname" ]; then echo "revising ownership on '$dirname'" sudo chown -R ${cooluser}:${cooluser} "$dirname" - exit_on_error "chowning for ${cooluser}: $dirname" + continue_on_error "chowning for ${cooluser}: $dirname" fi done # special case for archives directory in stuffing. if [ -d /z/stuffing -o -L /z/stuffing ]; then sudo chown ${cooluser}:${cooluser} /z/ - exit_on_error "chowning /z for ${cooluser}" + continue_on_error "chowning /z for ${cooluser}" sudo chmod g+rx,o+rx /z - exit_on_error "chmodding /z/ for ${cooluser}" + continue_on_error "chmodding /z/ for ${cooluser}" sudo chown ${cooluser}:${cooluser} /z/stuffing/ - exit_on_error "chowning /z/stuffing for ${cooluser}" + continue_on_error "chowning /z/stuffing for ${cooluser}" sudo chmod g+rx,o-rwx /z/stuffing - exit_on_error "chmodding /z/stuffing for ${cooluser}" + continue_on_error "chmodding /z/stuffing for ${cooluser}" pushd /z/stuffing &>/dev/null if [ -d archives -o -L archives ]; then sudo chown ${cooluser}:${cooluser} archives/ - exit_on_error "chowning /z/stuffing/archives for ${cooluser}" + continue_on_error "chowning /z/stuffing/archives for ${cooluser}" sudo chmod -R g+rwx archives - exit_on_error "chmodding /z/stuffing/archives for ${cooluser}" + continue_on_error "chmodding /z/stuffing/archives for ${cooluser}" fi popd &>/dev/null fi # make the log files readable by normal humans. sudo bash $FEISTY_MEOW_SCRIPTS/security/normal_perm.sh /var/log - exit_on_error "setting normal perms on /var/log" + continue_on_error "setting normal perms on /var/log" } # this block should execute when the script is actually run, rather @@ -83,9 +83,9 @@ if [[ $0 =~ .*cool_permissionator\.sh.* ]]; then THISDIR="$( \cd "$(\dirname "$0")" && /bin/pwd )" export FEISTY_MEOW_APEX="$( \cd "$THISDIR/../.." && \pwd )" source "$THISDIR/../core/launch_feisty_meow.sh" - exit_on_error "sourcing the feisty meow launcher" + continue_on_error "sourcing the feisty meow launcher" coolio="$USER" reapply_cool_permissions "$coolio" - exit_on_error "reapplying cool permissions on $coolio" + continue_on_error "reapplying cool permissions on $coolio" fi