summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/run-postinsts
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/run-postinsts')
-rwxr-xr-xmeta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts15
1 files changed, 11 insertions, 4 deletions
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index c94c3e9..11141ec 100755
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -16,7 +16,16 @@ for pm in rpm deb ipk; do
fi
done
-[ -z "$pi_dir" ] && exit 0
+remove_rcsd_link () {
+ if [ -n "`which update-rc.d`" ]; then
+ update-rc.d -f run-postinsts remove
+ fi
+}
+
+if [ -z "$pi_dir" ]; then
+ remove_rcsd_link
+ exit 0
+fi
[ -e #SYSCONFDIR#/default/postinst ] && . #SYSCONFDIR#/default/postinst
@@ -43,7 +52,5 @@ done
# and the rcS.d link
if [ $remove_pi_dir = 1 ]; then
rm -rf $pi_dir
- if [ -n "`which update-rc.d`" ]; then
- update-rc.d -f run-postinsts remove
- fi
+ remove_rcsd_link
fi
OpenPOWER on IntegriCloud