]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
mkjail: change script order: jailist update now happens before post-install scripts
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sun, 11 Feb 2007 19:55:23 +0000 (19:55 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sun, 11 Feb 2007 19:55:23 +0000 (19:55 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@184 04377dda-e619-0410-9926-eae83683ac58

trunk/src/metapkg
trunk/src/mkjail

index e83ee4dc757158c08bf9212116778c2722c8c338..d86807e6d04e83c3c4a196498dbc100af98c4b71 100755 (executable)
 # 
 
 COMMON="/usr/libexec/simplepkg/common.sh"
+BASENAME="`basename $0`"
 ROOT="/"
 
 function usage {
-  echo "usage: [ROOT=/otherroot] `basename $0` --option [metapackage]"
+  echo "usage: [ROOT=/otherroot] $BASENAME --option [metapackage]"
   echo "options: --install, --remove"
   exit 1
 }
@@ -40,7 +41,7 @@ fi
 if [ -z "$2" ]; then
   usage
 else
-  eval_config `basename $0` -u
+  eval_config $BASENAME -u
 fi
 
 if [ ! -f "$BASE_CONF/$2.template" ]; then
@@ -51,9 +52,9 @@ else
   unset server
 fi
 
-if [[ "$1" == "--install" ]]; then
+if [ "$1" == "--install" ] || [ "$1" == "install" ]; then
   install_packages
-elif [[ "$1" == "--remove" ]]; then
+elif [ "$1" == "--remove" ] || [ "$1" == "remove" ]; then
   remove_packages
 else
   usage
index a79bfe694172f8ef9654112313e0f8e007a49839..14b50c98514820793b7390487a33a3468177080e 100755 (executable)
@@ -140,8 +140,8 @@ echo "$BASENAME: instaling packages into $JAIL_ROOT/$server using $TEMPLATE..."
 install_packages
 copy_template_files $JAIL_ROOT/$server
 set_jail_perms $JAIL_ROOT/$server
-exec_post_install_scripts $JAIL_ROOT $server
 jailist_update $JAIL_ROOT/$server
+exec_post_install_scripts $JAIL_ROOT $server
 
 echo $BASENAME: done creating $server jail