Split installation/removal parts in prepost-action scripts.

There are two scripts that can be used now:
	- prepost-inst: for pre/post actions at installation.
	- prepost-rm: for pre/post actions at removal.

--HG--
extra : convert_revision : 5e054758f549f5c81693b825795fbb36e2d5513a
This commit is contained in:
Juan RP
2009-02-03 17:32:51 +01:00
parent 388dd30b45
commit 6c252d43d4
8 changed files with 33 additions and 29 deletions

View File

@@ -8,9 +8,9 @@ export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
# $4 = version
case "$2" in
preinst)
pre)
;;
postinst)
post)
echo "Running $3-$4 post-installation command..."
if [ "$1" = "NOTSET" ]; then
run_cmd="/sbin/genrunlevel --all"

View File

@@ -8,9 +8,9 @@ export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
# $4 = version
case "$2" in
preinst)
pre)
;;
postinst)
post)
echo "Running $3-$4 post-installation command..."
if [ "$1" = "NOTSET" ]; then
if $(mount|grep "^/proc" 2>&1 >/dev/null); then

View File

@@ -44,9 +44,9 @@ _EOF
}
case "$2" in
preinst)
pre)
;;
postinst)
post)
if [ "$1" = "NOTSET" ]; then
run_cmd="pwconv"
else
@@ -58,7 +58,7 @@ postinst)
if [ ! -f ./etc/shadow ]; then
echo "Enabling shadow passwords..."
${run_cmd}
${run_cmd}
fi
;;
esac