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 c94c3e92ec..11141ec71f 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
16 fi 16 fi
17done 17done
18 18
19[ -z "$pi_dir" ] && exit 0 19remove_rcsd_link () {
20 if [ -n "`which update-rc.d`" ]; then
21 update-rc.d -f run-postinsts remove
22 fi
23}
24
25if [ -z "$pi_dir" ]; then
26 remove_rcsd_link
27 exit 0
28fi
20 29
21[ -e #SYSCONFDIR#/default/postinst ] && . #SYSCONFDIR#/default/postinst 30[ -e #SYSCONFDIR#/default/postinst ] && . #SYSCONFDIR#/default/postinst
22 31
@@ -43,7 +52,5 @@ done
43# and the rcS.d link 52# and the rcS.d link
44if [ $remove_pi_dir = 1 ]; then 53if [ $remove_pi_dir = 1 ]; then
45 rm -rf $pi_dir 54 rm -rf $pi_dir
46 if [ -n "`which update-rc.d`" ]; then 55 remove_rcsd_link
47 update-rc.d -f run-postinsts remove
48 fi
49fi 56fi