diff options
Diffstat (limited to 'autoscripts')
42 files changed, 48 insertions, 141 deletions
diff --git a/autoscripts/postinst-doc-base b/autoscripts/postinst-doc-base index 39265721..c3653bed 100644 --- a/autoscripts/postinst-doc-base +++ b/autoscripts/postinst-doc-base @@ -1,3 +1,3 @@ -if [ "$1" = configure ] && which install-docs >/dev/null 2>&1; then +if command -v install-docs >/dev/null 2>&1; then install-docs -i /usr/share/doc-base/#DOC-ID# fi diff --git a/autoscripts/postinst-emacsen b/autoscripts/postinst-emacsen index f80e1dbd..45f1deec 100644 --- a/autoscripts/postinst-emacsen +++ b/autoscripts/postinst-emacsen @@ -1,4 +1 @@ -if [ "$1" = "configure" ] && [ -x /usr/lib/emacsen-common/emacs-package-install ] -then - /usr/lib/emacsen-common/emacs-package-install #PACKAGE# -fi +/usr/lib/emacsen-common/emacs-package-install #PACKAGE# diff --git a/autoscripts/postinst-info b/autoscripts/postinst-info index 71ffa19b..59881a19 100644 --- a/autoscripts/postinst-info +++ b/autoscripts/postinst-info @@ -1,3 +1 @@ -if [ "$1" = "configure" ]; then - install-info --quiet --section "#SECTION#" "#SECTION#" #FILE# -fi +install-info --quiet --section "#SECTION#" "#SECTION#" #FILE# diff --git a/autoscripts/postinst-info-nosection b/autoscripts/postinst-info-nosection index ffef8636..cba27d27 100644 --- a/autoscripts/postinst-info-nosection +++ b/autoscripts/postinst-info-nosection @@ -1,3 +1 @@ -if [ "$1" = "configure" ]; then - install-info --quiet #FILE# -fi +install-info --quiet #FILE# diff --git a/autoscripts/postinst-init b/autoscripts/postinst-init index b5bd7a57..976c6b34 100644 --- a/autoscripts/postinst-init +++ b/autoscripts/postinst-init @@ -1,8 +1,2 @@ -if [ -x "/etc/init.d/#SCRIPT#" ]; then - update-rc.d #SCRIPT# #INITPARMS# >/dev/null - if [ -x /usr/sbin/invoke-rc.d ]; then - invoke-rc.d #SCRIPT# start - else - /etc/init.d/#SCRIPT# start - fi -fi +update-rc.d #SCRIPT# #INITPARMS# >/dev/null +/etc/init.d/#SCRIPT# start diff --git a/autoscripts/postinst-init-norestart b/autoscripts/postinst-init-norestart new file mode 100644 index 00000000..b33702c5 --- /dev/null +++ b/autoscripts/postinst-init-norestart @@ -0,0 +1,6 @@ +update-rc.d #SCRIPT# #INITPARMS# >/dev/null +if [ "$1" = "configure" ]; then + if [ -z "$2" -o "$2" = "<unknown>" ]; then + /etc/init.d/#SCRIPT# start + fi +fi diff --git a/autoscripts/postinst-init-nostart b/autoscripts/postinst-init-nostart deleted file mode 100644 index 5d882b6f..00000000 --- a/autoscripts/postinst-init-nostart +++ /dev/null @@ -1,3 +0,0 @@ -if [ -x "/etc/init.d/#SCRIPT#" ]; then - update-rc.d #SCRIPT# #INITPARMS# >/dev/null -fi diff --git a/autoscripts/postinst-makeshlibs b/autoscripts/postinst-makeshlibs deleted file mode 100644 index 8a25b9e9..00000000 --- a/autoscripts/postinst-makeshlibs +++ /dev/null @@ -1,3 +0,0 @@ -if [ "$1" = "configure" ]; then - ldconfig -fi diff --git a/autoscripts/postinst-menu b/autoscripts/postinst-menu index 276a3c0a..2be88247 100644 --- a/autoscripts/postinst-menu +++ b/autoscripts/postinst-menu @@ -1 +1 @@ -if [ "$1" = "configure" ] && [ -x /usr/bin/update-menus ]; then update-menus ; fi +if test -x /usr/bin/update-menus ; then update-menus ; fi diff --git a/autoscripts/postinst-menu-method b/autoscripts/postinst-menu-method index 01913d82..03acde7f 100644 --- a/autoscripts/postinst-menu-method +++ b/autoscripts/postinst-menu-method @@ -1,5 +1,5 @@ inst=/etc/menu-methods/#PACKAGE# -if [ -x /usr/bin/update-menus ] && [ -f $inst ] ; then +if [ -x /usr/bin/update-menus -a -f $inst ] ; then chmod a+x $inst update-menus fi diff --git a/autoscripts/postinst-mime b/autoscripts/postinst-mime index bef63cc9..e993233b 100644 --- a/autoscripts/postinst-mime +++ b/autoscripts/postinst-mime @@ -1 +1 @@ -if [ "$1" = "configure" ] && [ -x /usr/sbin/update-mime ]; then update-mime; fi +if [ -x /usr/sbin/update-mime ]; then update-mime; fi diff --git a/autoscripts/postinst-modules b/autoscripts/postinst-modules index babf39bd..a8f4ce70 100644 --- a/autoscripts/postinst-modules +++ b/autoscripts/postinst-modules @@ -1,3 +1,2 @@ -if [ "$1" = "configure" ] && [ -x /sbin/update-modules ]; then - update-modules >/dev/null -fi +update-modules +depmod -a diff --git a/autoscripts/postinst-python b/autoscripts/postinst-python deleted file mode 100644 index 6f1f9a5b..00000000 --- a/autoscripts/postinst-python +++ /dev/null @@ -1,8 +0,0 @@ -PYTHON=#PYVER# -if which $PYTHON >/dev/null 2>&1; then - DIRLIST="#DIRLIST#" - for i in $DIRLIST ; do - $PYTHON -O /usr/lib/$PYTHON/compileall.py -q $i - $PYTHON /usr/lib/$PYTHON/compileall.py -q $i - done -fi diff --git a/autoscripts/postinst-scrollkeeper b/autoscripts/postinst-scrollkeeper deleted file mode 100644 index 5f2a255d..00000000 --- a/autoscripts/postinst-scrollkeeper +++ /dev/null @@ -1,3 +0,0 @@ -if [ "$1" = "configure" ]; then - scrollkeeper-update -q -fi diff --git a/autoscripts/postinst-sgmlcatalog b/autoscripts/postinst-sgmlcatalog deleted file mode 100644 index 100dee2f..00000000 --- a/autoscripts/postinst-sgmlcatalog +++ /dev/null @@ -1,7 +0,0 @@ -if [ "$1" = "configure" ]; then - rm -f #CENTRALCAT# - for ordcat in #ORDCATS#; do - update-catalog --quiet --add #CENTRALCAT# ${ordcat} - done - update-catalog --quiet --add --super #CENTRALCAT# -fi diff --git a/autoscripts/postinst-suid b/autoscripts/postinst-suid index d0d16c06..dcc277fd 100644 --- a/autoscripts/postinst-suid +++ b/autoscripts/postinst-suid @@ -1,8 +1,6 @@ -if [ "$1" = "configure" ]; then - if which suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then - suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS# - elif [ -e /#FILE# ]; then - chown #OWNER#.#GROUP# /#FILE# - chmod #PERMS# /#FILE# - fi +if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then + suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS# +elif [ -e /#FILE# ]; then + chown #OWNER#.#GROUP# /#FILE# + chmod #PERMS# /#FILE# fi diff --git a/autoscripts/postinst-usrlocal b/autoscripts/postinst-usrlocal deleted file mode 100644 index a2f004db..00000000 --- a/autoscripts/postinst-usrlocal +++ /dev/null @@ -1,16 +0,0 @@ -if [ "$1" = configure ]; then -( - while read line; do - set -- $line - dir="$1"; mode="$2"; user="$3"; group="$4" - if [ ! -e "$dir" ]; then - if mkdir "$dir" 2>/dev/null; then - chown "$user":"$group" "$dir" - chmod "$mode" "$dir" - fi - fi - done -) << DATA -#DIRS# -DATA -fi diff --git a/autoscripts/postinst-wm b/autoscripts/postinst-wm index aef412a3..925c7883 100644 --- a/autoscripts/postinst-wm +++ b/autoscripts/postinst-wm @@ -1,4 +1,3 @@ -if [ "$1" = "configure" ]; then - update-alternatives --install /usr/bin/x-window-manager \ - x-window-manager #WM# #PRIORITY# +if command -v register-window-manager >/dev/null 2>&1; then + register-window-manager --add #WM# fi diff --git a/autoscripts/postinst-xaw b/autoscripts/postinst-xaw new file mode 100644 index 00000000..3d8e2d1b --- /dev/null +++ b/autoscripts/postinst-xaw @@ -0,0 +1,6 @@ +if test -x /usr/sbin/update-xaw-wrappers; then + /usr/sbin/update-xaw-wrappers +fi +for opts in #OPTS#; do + update-alternatives --quiet --install $opts 25 +done diff --git a/autoscripts/postinst-xfonts b/autoscripts/postinst-xfonts deleted file mode 100644 index 96390e4e..00000000 --- a/autoscripts/postinst-xfonts +++ /dev/null @@ -1,3 +0,0 @@ -if which update-fonts-dir >/dev/null 2>&1; then - #CMDS# -fi diff --git a/autoscripts/postrm-debconf b/autoscripts/postrm-debconf deleted file mode 100644 index 5a61724d..00000000 --- a/autoscripts/postrm-debconf +++ /dev/null @@ -1,4 +0,0 @@ -if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule - db_purge -fi diff --git a/autoscripts/postrm-init b/autoscripts/postrm-init index 9596dd97..1c292982 100644 --- a/autoscripts/postrm-init +++ b/autoscripts/postrm-init @@ -1,3 +1,3 @@ if [ "$1" = "purge" ] ; then - update-rc.d #SCRIPT# remove #INITPARMS# >/dev/null + update-rc.d #SCRIPT# remove >/dev/null fi diff --git a/autoscripts/postrm-makeshlibs b/autoscripts/postrm-makeshlibs deleted file mode 100644 index 96bf24ed..00000000 --- a/autoscripts/postrm-makeshlibs +++ /dev/null @@ -1,3 +0,0 @@ -if [ "$1" = "remove" ]; then - ldconfig -fi diff --git a/autoscripts/postrm-menu b/autoscripts/postrm-menu deleted file mode 100644 index a180558d..00000000 --- a/autoscripts/postrm-menu +++ /dev/null @@ -1 +0,0 @@ -if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi diff --git a/autoscripts/postrm-menu-method b/autoscripts/postrm-menu-method index ffa1e486..3270b7c7 100644 --- a/autoscripts/postrm-menu-method +++ b/autoscripts/postrm-menu-method @@ -1,3 +1,3 @@ inst=/etc/menu-methods/#PACKAGE# -if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi -if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi +if [ "$1" = "remove" -a -f "$inst" ]; then chmod a-x $inst ; fi +if test -x /usr/bin/update-menus ; then update-menus; fi diff --git a/autoscripts/postrm-mime b/autoscripts/postrm-mime deleted file mode 100644 index a9404112..00000000 --- a/autoscripts/postrm-mime +++ /dev/null @@ -1 +0,0 @@ -if which update-mime >/dev/null 2>&1; then update-mime; fi diff --git a/autoscripts/postrm-modules b/autoscripts/postrm-modules deleted file mode 100644 index f2d4cb7a..00000000 --- a/autoscripts/postrm-modules +++ /dev/null @@ -1,3 +0,0 @@ -if [ -x /sbin/update-modules ]; then - update-modules >/dev/null -fi diff --git a/autoscripts/postrm-scrollkeeper b/autoscripts/postrm-scrollkeeper deleted file mode 100644 index 47b71544..00000000 --- a/autoscripts/postrm-scrollkeeper +++ /dev/null @@ -1,3 +0,0 @@ -if [ "$1" = "remove" ] && which scrollkeeper-update >/dev/null 2>&1; then - scrollkeeper-update -q -fi diff --git a/autoscripts/postrm-sgmlcatalog b/autoscripts/postrm-sgmlcatalog deleted file mode 100644 index 168a6949..00000000 --- a/autoscripts/postrm-sgmlcatalog +++ /dev/null @@ -1,3 +0,0 @@ -if [ "$1" = "purge" ]; then - rm -f #CENTRALCAT# #CENTRALCAT#.old -fi diff --git a/autoscripts/postrm-suid b/autoscripts/postrm-suid index a4cfecf9..d4a76199 100644 --- a/autoscripts/postrm-suid +++ b/autoscripts/postrm-suid @@ -1,4 +1,3 @@ -if [ "$1" = remove ] && [ -e /etc/suid.conf ] && \ - which suidunregister >/dev/null 2>&1; then +if command -v suidunregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then suidunregister -s #PACKAGE# /#FILE# fi diff --git a/autoscripts/postrm-wm b/autoscripts/postrm-wm new file mode 100644 index 00000000..6a7eb47a --- /dev/null +++ b/autoscripts/postrm-wm @@ -0,0 +1,4 @@ +if [ "$1" = "purge" ] && command -v register-window-manager >/dev/null 2>&1 +then + register-window-manager --remove #WM# +fi diff --git a/autoscripts/postrm-xaw b/autoscripts/postrm-xaw new file mode 100644 index 00000000..b8d718ea --- /dev/null +++ b/autoscripts/postrm-xaw @@ -0,0 +1,3 @@ +if test -x /usr/sbin/update-xaw-wrappers; then + /usr/sbin/update-xaw-wrappers +fi diff --git a/autoscripts/postrm-xfonts b/autoscripts/postrm-xfonts deleted file mode 100644 index a4d0a082..00000000 --- a/autoscripts/postrm-xfonts +++ /dev/null @@ -1,3 +0,0 @@ -if [ "$1" != "upgrade" ] && [ -x /usr/sbin/update-fonts-dir ]; then -#CMDS# -fi diff --git a/autoscripts/prerm-doc-base b/autoscripts/prerm-doc-base index c57d999a..9678003e 100644 --- a/autoscripts/prerm-doc-base +++ b/autoscripts/prerm-doc-base @@ -1,4 +1,3 @@ -if [ "$1" = remove ] || [ "$1" = upgrade ] && \ - which install-docs >/dev/null 2>&1; then +if command -v install-docs >/dev/null 2>&1; then install-docs -r #DOC-ID# fi diff --git a/autoscripts/prerm-emacsen b/autoscripts/prerm-emacsen index 8c3ca64c..d11dafab 100644 --- a/autoscripts/prerm-emacsen +++ b/autoscripts/prerm-emacsen @@ -1,3 +1 @@ -if [ -x /usr/lib/emacsen-common/emacs-package-remove ] ; then - /usr/lib/emacsen-common/emacs-package-remove #PACKAGE# -fi +/usr/lib/emacsen-common/emacs-package-remove #PACKAGE# diff --git a/autoscripts/prerm-init b/autoscripts/prerm-init index eab98c72..64975a38 100644 --- a/autoscripts/prerm-init +++ b/autoscripts/prerm-init @@ -1,7 +1 @@ -if [ -x "/etc/init.d/#SCRIPT#" ]; then - if [ -x /usr/sbin/invoke-rc.d ] ; then - invoke-rc.d #SCRIPT# stop - else - /etc/init.d/#SCRIPT# stop - fi -fi +/etc/init.d/#SCRIPT# stop diff --git a/autoscripts/prerm-init-norestart b/autoscripts/prerm-init-norestart deleted file mode 100644 index fb991524..00000000 --- a/autoscripts/prerm-init-norestart +++ /dev/null @@ -1,7 +0,0 @@ -if [ -x "/etc/init.d/#SCRIPT#" ] && [ "$1" = remove ]; then - if [ -x /usr/sbin/invoke-rc.d ] ; then - invoke-rc.d #SCRIPT# stop - else - /etc/init.d/#SCRIPT# stop - fi -fi diff --git a/autoscripts/prerm-python b/autoscripts/prerm-python deleted file mode 100644 index 0dc12731..00000000 --- a/autoscripts/prerm-python +++ /dev/null @@ -1,5 +0,0 @@ -if [ "$1" = remove ]; then - dpkg -L #PACKAGE# | - awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | - xargs rm -f >&2 -fi diff --git a/autoscripts/prerm-sgmlcatalog b/autoscripts/prerm-sgmlcatalog deleted file mode 100644 index cdc96e02..00000000 --- a/autoscripts/prerm-sgmlcatalog +++ /dev/null @@ -1,3 +0,0 @@ -if [ "$1" = "remove" ]; then - update-catalog --quiet --remove --super #CENTRALCAT# -fi diff --git a/autoscripts/prerm-usrlocal b/autoscripts/prerm-usrlocal deleted file mode 100644 index baafc23e..00000000 --- a/autoscripts/prerm-usrlocal +++ /dev/null @@ -1,7 +0,0 @@ -( - while read dir; do - rmdir "$dir" 2>/dev/null || true - done -) << DATA -#JUSTDIRS# -DATA diff --git a/autoscripts/prerm-wm b/autoscripts/prerm-wm deleted file mode 100644 index b97d627f..00000000 --- a/autoscripts/prerm-wm +++ /dev/null @@ -1,3 +0,0 @@ -if [ "$1" = "remove" ]; then - update-alternatives --remove x-window-manager #WM# -fi diff --git a/autoscripts/prerm-xaw b/autoscripts/prerm-xaw new file mode 100644 index 00000000..2507a2f5 --- /dev/null +++ b/autoscripts/prerm-xaw @@ -0,0 +1,4 @@ +for opts in #OPTS#; do + update-alternatives --quiet --remove $opts +done + |