summaryrefslogtreecommitdiff
path: root/autoscripts
diff options
context:
space:
mode:
Diffstat (limited to 'autoscripts')
-rw-r--r--autoscripts/postinst-init2
-rw-r--r--autoscripts/postinst-menu4
-rw-r--r--autoscripts/postinst-menu-method2
-rw-r--r--autoscripts/postinst-mime4
-rw-r--r--autoscripts/postinst-sharedmimeinfo3
-rw-r--r--autoscripts/postrm-sharedmimeinfo3
-rw-r--r--autoscripts/postrm-xfonts2
-rw-r--r--autoscripts/prerm-init2
-rw-r--r--autoscripts/prerm-init-norestart2
9 files changed, 17 insertions, 7 deletions
diff --git a/autoscripts/postinst-init b/autoscripts/postinst-init
index 8128cd9..6a1c572 100644
--- a/autoscripts/postinst-init
+++ b/autoscripts/postinst-init
@@ -1,6 +1,6 @@
if [ -x "/etc/init.d/#SCRIPT#" ]; then
update-rc.d #SCRIPT# #INITPARMS# >/dev/null
- if [ -x /usr/sbin/invoke-rc.d ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d #SCRIPT# start || #ERROR_HANDLER#
else
/etc/init.d/#SCRIPT# start || #ERROR_HANDLER#
diff --git a/autoscripts/postinst-menu b/autoscripts/postinst-menu
index 276a3c0..b56a346 100644
--- a/autoscripts/postinst-menu
+++ b/autoscripts/postinst-menu
@@ -1 +1,3 @@
-if [ "$1" = "configure" ] && [ -x /usr/bin/update-menus ]; then update-menus ; fi
+if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
+ update-menus
+fi
diff --git a/autoscripts/postinst-menu-method b/autoscripts/postinst-menu-method
index d3ef636..c56d625 100644
--- a/autoscripts/postinst-menu-method
+++ b/autoscripts/postinst-menu-method
@@ -1,7 +1,7 @@
inst=/etc/menu-methods/#PACKAGE#
if [ -f $inst ]; then
chmod a+x $inst
- if [ -x /usr/bin/update-menus ]; then
+ if [ -x "`which update-menus 2>/dev/null`" ]; then
update-menus
fi
fi
diff --git a/autoscripts/postinst-mime b/autoscripts/postinst-mime
index bef63cc..3749fc9 100644
--- a/autoscripts/postinst-mime
+++ b/autoscripts/postinst-mime
@@ -1 +1,3 @@
-if [ "$1" = "configure" ] && [ -x /usr/sbin/update-mime ]; then update-mime; fi
+if [ "$1" = "configure" ] && [ -x "`which update-mime 2>/dev/null`" ]; then
+ update-mime
+fi
diff --git a/autoscripts/postinst-sharedmimeinfo b/autoscripts/postinst-sharedmimeinfo
new file mode 100644
index 0000000..aa6333f
--- /dev/null
+++ b/autoscripts/postinst-sharedmimeinfo
@@ -0,0 +1,3 @@
+if [ "$1" = "configure" ] && [ -x "`which update-mime-database 2>/dev/null`" ]; then
+ update-mime-database /usr/share/mime
+fi
diff --git a/autoscripts/postrm-sharedmimeinfo b/autoscripts/postrm-sharedmimeinfo
new file mode 100644
index 0000000..917fd49
--- /dev/null
+++ b/autoscripts/postrm-sharedmimeinfo
@@ -0,0 +1,3 @@
+if [ -x "`which update-mime-database 2>/dev/null`" ]; then
+ update-mime-database /usr/share/mime
+fi
diff --git a/autoscripts/postrm-xfonts b/autoscripts/postrm-xfonts
index a4d0a08..42fea68 100644
--- a/autoscripts/postrm-xfonts
+++ b/autoscripts/postrm-xfonts
@@ -1,3 +1,3 @@
-if [ "$1" != "upgrade" ] && [ -x /usr/sbin/update-fonts-dir ]; then
+if [ "$1" != "upgrade" ] && [ -x "`which update-fonts-dir 2>/dev/null`" ]; then
#CMDS#
fi
diff --git a/autoscripts/prerm-init b/autoscripts/prerm-init
index 014fa9a..96d3755 100644
--- a/autoscripts/prerm-init
+++ b/autoscripts/prerm-init
@@ -1,5 +1,5 @@
if [ -x "/etc/init.d/#SCRIPT#" ]; then
- if [ -x /usr/sbin/invoke-rc.d ] ; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER#
else
/etc/init.d/#SCRIPT# stop || #ERROR_HANDLER#
diff --git a/autoscripts/prerm-init-norestart b/autoscripts/prerm-init-norestart
index 0f64c45..9b63174 100644
--- a/autoscripts/prerm-init-norestart
+++ b/autoscripts/prerm-init-norestart
@@ -1,5 +1,5 @@
if [ -x "/etc/init.d/#SCRIPT#" ] && [ "$1" = remove ]; then
- if [ -x /usr/sbin/invoke-rc.d ] ; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER#
else
/etc/init.d/#SCRIPT# stop || #ERROR_HANDLER#