Explorar el Código

* Autodetectar ejecutables

guzman hace 6 años
padre
commit
25a94e1830
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      cryfs-automount

+ 2 - 2
cryfs-automount

@@ -175,14 +175,14 @@ fi
 name=$1
 name=$1
 
 
 #Check if cryfs is installed
 #Check if cryfs is installed
-if [ ! -x /usr/local/bin/cryfs ]; then
+if [ ! -x "$(which cryfs)" ]; then
 	echo "ERROR: CryFS is not installed."
 	echo "ERROR: CryFS is not installed."
 	echo "https://www.cryfs.org/#download"
 	echo "https://www.cryfs.org/#download"
 	exit 1
 	exit 1
 fi
 fi
 
 
 #Check if cryfs-automount is installed
 #Check if cryfs-automount is installed
-if [ ! -x /usr/local/bin/$(basename "$0") ]; then
+if [ ! -x "$(which $(basename "$0"))" ]; then
 	echo "WARNING: "$(basename "$0")" is not installed."
 	echo "WARNING: "$(basename "$0")" is not installed."
 	echo "We'll use root access only for installation."
 	echo "We'll use root access only for installation."
 	test=$(sudo whoami)
 	test=$(sudo whoami)