From 27c1ca24900a98a6987fb0c79990e49528333694 Mon Sep 17 00:00:00 2001 From: hellekin Date: Fri, 25 Nov 2011 09:00:47 +0100 Subject: [PATCH] Fix PATH for cryptsetup when user does not have /sbin in it. --- configure.ac | 2 +- src/tomb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 411a55d..73e2b42 100644 --- a/configure.ac +++ b/configure.ac @@ -79,7 +79,7 @@ dnl these are not *build* dependencies, but *runtime* dependencies. dnl Mandatory AC_CHECK_PROG(have_zsh,zsh,yes,no) -AC_CHECK_PROG(have_cryptsetup,cryptsetup,yes,no) +AC_CHECK_PROG(have_cryptsetup,cryptsetup,yes,no,[/sbin$PATH_SEPARATOR/usr/local/sbin$PATH_SEPARATOR$PATH]) AC_CHECK_PROG(have_pinentry,pinentry,yes,no) AC_CHECK_PROG(have_sudo,sudo,yes,no) dnl Optional diff --git a/src/tomb b/src/tomb index 7e141a4..c0a536e 100755 --- a/src/tomb +++ b/src/tomb @@ -37,6 +37,10 @@ DEBUG=0 typeset -A global_opts typeset -A opts +# Set a sensible PATH +PATH=/sbin:/bin:/usr/sbin:/usr/bin +[[ "$TOMBEXEC" =~ "^/usr/local" ]] && PATH="/usr/local/bin:/usr/local/sbin:$PATH" + # PATH=/usr/bin:/usr/sbin:/bin:/sbin # }}} # {{{ HELPER FUNCTIONS