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:
@@ -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"
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user