From a566f31d7ae6dc4f99b0e7e035ba4760a4ab719c Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Fri, 3 Nov 2017 02:25:38 -0400 Subject: [PATCH] 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. --- scripts/system/add_swap_mount.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. -- 2.34.1