diff --git a/common/elevate.sh b/common/elevate.sh index fc8ed6a..65e8dc9 100644 --- a/common/elevate.sh +++ b/common/elevate.sh @@ -5,8 +5,8 @@ require_root() [ $(id -u) -ne "0" ] && { echo root is required exe="$EXEDIR/$(basename "$0")" - exists sudo && exec sudo "$exe" - exists su && exec su root -c "$exe" + exists sudo && exec sudo sh "$exe" + exists su && exec su root -c "sh \"$exe\"" echo su or sudo not found exitp 2 } diff --git a/install_easy.sh b/install_easy.sh index 56b5e76..6dc7669 100755 --- a/install_easy.sh +++ b/install_easy.sh @@ -76,6 +76,7 @@ check_bins() { echo \* checking executables + fix_perms_bin_test "$EXEDIR" local arch=$(get_bin_arch) local make_target [ "$FORCE_BUILD" = "1" ] && { @@ -467,6 +468,11 @@ copy_openwrt() cp "$BINDIR/tpws" "$BINDIR/nfqws" "$BINDIR/ip2net" "$BINDIR/mdig" "$2/binaries/$ARCH" } +fix_perms_bin_test() +{ + [ -d "$1" ] || return + find "$1/binaries" -name ip2net -exec chmod +x {} \; +} fix_perms() { [ -d "$1" ] || return