]> gitweb.fluxo.info Git - hydra.git/commitdiff
Refactoring hydra_install_package
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 7 May 2011 02:34:50 +0000 (23:34 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 7 May 2011 02:34:50 +0000 (23:34 -0300)
lib/hydra/misc

index 6bd0c61d8a72b15dddc37912226ee563f8aaa0ce..1187068e12e20c3dc7afea484965945ef0fb7941 100644 (file)
@@ -25,13 +25,13 @@ function hydra_user_input {
   fi
 }
 
-# Install a package based on command name.
+# Install a package.
 function hydra_install_package {
   if [ -z "$1" ]; then
     return
   fi
 
-  which $1 &> /dev/null
+  dpkg -s cryptsetu $1 &> /dev/null
 
   if [ "$?" == "1" ]; then
     apt-get install $1 -y