From: Chris Koeritz Date: Fri, 3 Nov 2017 06:25:38 +0000 (-0400) Subject: working version of add swap X-Git-Tag: 2.140.90~104 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=a566f31d7ae6dc4f99b0e7e035ba4760a4ab719c;p=feisty_meow.git working version of add swap prior version was borked since we don't have variables we expect when run as sudo. this just uses the relative location of the script to find the core directory for loading feisty meow. --- diff --git a/scripts/system/add_swap_mount.sh b/scripts/system/add_swap_mount.sh index 200cb365..f20c5cb6 100644 --- a/scripts/system/add_swap_mount.sh +++ b/scripts/system/add_swap_mount.sh @@ -1,6 +1,8 @@ #!/bin/bash -source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" +# auto-find the scripts, since we might want to run this as sudo. +export WORKDIR="$( \cd "$(\dirname "$0")" && /bin/pwd )" # obtain the script's working directory. +source "$WORKDIR/../core/launch_feisty_meow.sh" #hmmm: should be able to add a new swap drive if desired.