summaryrefslogtreecommitdiff
path: root/autoscripts
diff options
context:
space:
mode:
Diffstat (limited to 'autoscripts')
-rw-r--r--autoscripts/maintscript-helper1
-rw-r--r--autoscripts/postinst-emacsen4
-rw-r--r--autoscripts/postinst-icons3
-rw-r--r--autoscripts/postinst-init4
-rw-r--r--autoscripts/postinst-init-nostart3
-rw-r--r--autoscripts/postinst-init-restart9
-rw-r--r--autoscripts/postinst-init-tmpfiles5
-rw-r--r--autoscripts/postinst-makeshlibs3
-rw-r--r--autoscripts/postinst-menu3
-rw-r--r--autoscripts/postinst-menu-method7
-rw-r--r--autoscripts/postinst-modules5
-rw-r--r--autoscripts/postinst-moveconffile9
-rw-r--r--autoscripts/postinst-python7
-rw-r--r--autoscripts/postinst-suid8
-rw-r--r--autoscripts/postinst-ucf4
-rw-r--r--autoscripts/postinst-usrlocal16
-rw-r--r--autoscripts/postinst-wm6
-rw-r--r--autoscripts/postinst-wm-noman4
-rw-r--r--autoscripts/postinst-xfonts3
-rw-r--r--autoscripts/postrm-debconf4
-rw-r--r--autoscripts/postrm-icons3
-rw-r--r--autoscripts/postrm-init10
-rw-r--r--autoscripts/postrm-makeshlibs3
-rw-r--r--autoscripts/postrm-menu1
-rw-r--r--autoscripts/postrm-menu-method3
-rw-r--r--autoscripts/postrm-modules3
-rw-r--r--autoscripts/postrm-sgmlcatalog3
-rw-r--r--autoscripts/postrm-suid4
-rw-r--r--autoscripts/postrm-ucf12
-rw-r--r--autoscripts/postrm-xfonts3
-rw-r--r--autoscripts/preinst-emacsen5
-rw-r--r--autoscripts/preinst-moveconffile9
-rw-r--r--autoscripts/preinst-sgmlcatalog8
-rw-r--r--autoscripts/prerm-emacsen3
-rw-r--r--autoscripts/prerm-init3
-rw-r--r--autoscripts/prerm-init-norestart3
-rw-r--r--autoscripts/prerm-python3
-rw-r--r--autoscripts/prerm-usrlocal7
-rw-r--r--autoscripts/prerm-wm3
39 files changed, 197 insertions, 0 deletions
diff --git a/autoscripts/maintscript-helper b/autoscripts/maintscript-helper
new file mode 100644
index 00000000..c7e06c46
--- /dev/null
+++ b/autoscripts/maintscript-helper
@@ -0,0 +1 @@
+dpkg-maintscript-helper #PARAMS# -- "$@"
diff --git a/autoscripts/postinst-emacsen b/autoscripts/postinst-emacsen
new file mode 100644
index 00000000..6a46d79f
--- /dev/null
+++ b/autoscripts/postinst-emacsen
@@ -0,0 +1,4 @@
+if [ "$1" = "configure" ] && [ -e /var/lib/emacsen-common/state/package/installed/emacsen-common ]
+then
+ /usr/lib/emacsen-common/emacs-package-install --postinst #PACKAGE#
+fi
diff --git a/autoscripts/postinst-icons b/autoscripts/postinst-icons
new file mode 100644
index 00000000..9e00f039
--- /dev/null
+++ b/autoscripts/postinst-icons
@@ -0,0 +1,3 @@
+if which update-icon-caches >/dev/null 2>&1 ; then
+ update-icon-caches #DIRLIST#
+fi
diff --git a/autoscripts/postinst-init b/autoscripts/postinst-init
new file mode 100644
index 00000000..2430b2c0
--- /dev/null
+++ b/autoscripts/postinst-init
@@ -0,0 +1,4 @@
+if [ -x "/etc/init.d/#SCRIPT#" ]; then
+ update-rc.d #SCRIPT# #INITPARMS# >/dev/null
+ invoke-rc.d #SCRIPT# start || #ERROR_HANDLER#
+fi
diff --git a/autoscripts/postinst-init-nostart b/autoscripts/postinst-init-nostart
new file mode 100644
index 00000000..7a1bd5e8
--- /dev/null
+++ b/autoscripts/postinst-init-nostart
@@ -0,0 +1,3 @@
+if [ -x "/etc/init.d/#SCRIPT#" ]; then
+ update-rc.d #SCRIPT# #INITPARMS# >/dev/null || #ERROR_HANDLER#
+fi
diff --git a/autoscripts/postinst-init-restart b/autoscripts/postinst-init-restart
new file mode 100644
index 00000000..35bba207
--- /dev/null
+++ b/autoscripts/postinst-init-restart
@@ -0,0 +1,9 @@
+if [ -x "/etc/init.d/#SCRIPT#" ]; then
+ update-rc.d #SCRIPT# #INITPARMS# >/dev/null
+ if [ -n "$2" ]; then
+ _dh_action=restart
+ else
+ _dh_action=start
+ fi
+ invoke-rc.d #SCRIPT# $_dh_action || #ERROR_HANDLER#
+fi
diff --git a/autoscripts/postinst-init-tmpfiles b/autoscripts/postinst-init-tmpfiles
new file mode 100644
index 00000000..fd613bcd
--- /dev/null
+++ b/autoscripts/postinst-init-tmpfiles
@@ -0,0 +1,5 @@
+# In case this system is running systemd, we need to ensure that all
+# necessary tmpfiles (if any) are created before starting.
+if [ -d /run/systemd/system ] ; then
+ systemd-tmpfiles --create #TMPFILES# >/dev/null || true
+fi
diff --git a/autoscripts/postinst-makeshlibs b/autoscripts/postinst-makeshlibs
new file mode 100644
index 00000000..8a25b9e9
--- /dev/null
+++ b/autoscripts/postinst-makeshlibs
@@ -0,0 +1,3 @@
+if [ "$1" = "configure" ]; then
+ ldconfig
+fi
diff --git a/autoscripts/postinst-menu b/autoscripts/postinst-menu
new file mode 100644
index 00000000..b56a3462
--- /dev/null
+++ b/autoscripts/postinst-menu
@@ -0,0 +1,3 @@
+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
new file mode 100644
index 00000000..c56d6258
--- /dev/null
+++ b/autoscripts/postinst-menu-method
@@ -0,0 +1,7 @@
+inst=/etc/menu-methods/#PACKAGE#
+if [ -f $inst ]; then
+ chmod a+x $inst
+ if [ -x "`which update-menus 2>/dev/null`" ]; then
+ update-menus
+ fi
+fi
diff --git a/autoscripts/postinst-modules b/autoscripts/postinst-modules
new file mode 100644
index 00000000..f17dc2da
--- /dev/null
+++ b/autoscripts/postinst-modules
@@ -0,0 +1,5 @@
+if [ "$1" = "configure" ]; then
+ if [ -e /boot/System.map-#KVERS# ]; then
+ depmod -a -F /boot/System.map-#KVERS# #KVERS# || true
+ fi
+fi
diff --git a/autoscripts/postinst-moveconffile b/autoscripts/postinst-moveconffile
new file mode 100644
index 00000000..28f061e3
--- /dev/null
+++ b/autoscripts/postinst-moveconffile
@@ -0,0 +1,9 @@
+if [ "$1" = configure ]; then
+ if [ -e "#OLD#" ]; then
+ echo "Preserving user changes to #NEW# ..."
+ if [ -e "#NEW#" ]; then
+ mv -f "#NEW#" "#NEW#.dpkg-new"
+ fi
+ mv -f "#OLD#" "#NEW#"
+ fi
+fi
diff --git a/autoscripts/postinst-python b/autoscripts/postinst-python
new file mode 100644
index 00000000..5a1943eb
--- /dev/null
+++ b/autoscripts/postinst-python
@@ -0,0 +1,7 @@
+PYTHON=#PYVER#
+if which $PYTHON >/dev/null 2>&1 && [ -e /usr/lib/$PYTHON/compileall.py ]; then
+ DIRLIST="#DIRLIST#"
+ for i in $DIRLIST ; do
+ $PYTHON /usr/lib/$PYTHON/compileall.py -q $i
+ done
+fi
diff --git a/autoscripts/postinst-suid b/autoscripts/postinst-suid
new file mode 100644
index 00000000..db4bc6dd
--- /dev/null
+++ b/autoscripts/postinst-suid
@@ -0,0 +1,8 @@
+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
+fi
diff --git a/autoscripts/postinst-ucf b/autoscripts/postinst-ucf
new file mode 100644
index 00000000..05468310
--- /dev/null
+++ b/autoscripts/postinst-ucf
@@ -0,0 +1,4 @@
+if [ "$1" = "configure" ]; then
+ ucf "#UCFSRC#" "#UCFDEST#"
+ ucfr #PACKAGE# "#UCFDEST#"
+fi
diff --git a/autoscripts/postinst-usrlocal b/autoscripts/postinst-usrlocal
new file mode 100644
index 00000000..a2f004db
--- /dev/null
+++ b/autoscripts/postinst-usrlocal
@@ -0,0 +1,16 @@
+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
new file mode 100644
index 00000000..ee636287
--- /dev/null
+++ b/autoscripts/postinst-wm
@@ -0,0 +1,6 @@
+if [ "$1" = "configure" ]; then
+ update-alternatives --install /usr/bin/x-window-manager \
+ x-window-manager #WM# #PRIORITY# \
+ --slave /usr/share/man/man1/x-window-manager.1.gz \
+ x-window-manager.1.gz #WMMAN#
+fi
diff --git a/autoscripts/postinst-wm-noman b/autoscripts/postinst-wm-noman
new file mode 100644
index 00000000..aef412a3
--- /dev/null
+++ b/autoscripts/postinst-wm-noman
@@ -0,0 +1,4 @@
+if [ "$1" = "configure" ]; then
+ update-alternatives --install /usr/bin/x-window-manager \
+ x-window-manager #WM# #PRIORITY#
+fi
diff --git a/autoscripts/postinst-xfonts b/autoscripts/postinst-xfonts
new file mode 100644
index 00000000..96390e4e
--- /dev/null
+++ b/autoscripts/postinst-xfonts
@@ -0,0 +1,3 @@
+if which update-fonts-dir >/dev/null 2>&1; then
+ #CMDS#
+fi
diff --git a/autoscripts/postrm-debconf b/autoscripts/postrm-debconf
new file mode 100644
index 00000000..5a61724d
--- /dev/null
+++ b/autoscripts/postrm-debconf
@@ -0,0 +1,4 @@
+if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+ db_purge
+fi
diff --git a/autoscripts/postrm-icons b/autoscripts/postrm-icons
new file mode 100644
index 00000000..9e00f039
--- /dev/null
+++ b/autoscripts/postrm-icons
@@ -0,0 +1,3 @@
+if which update-icon-caches >/dev/null 2>&1 ; then
+ update-icon-caches #DIRLIST#
+fi
diff --git a/autoscripts/postrm-init b/autoscripts/postrm-init
new file mode 100644
index 00000000..6f5bb09a
--- /dev/null
+++ b/autoscripts/postrm-init
@@ -0,0 +1,10 @@
+if [ "$1" = "purge" ] ; then
+ update-rc.d #SCRIPT# remove >/dev/null
+fi
+
+
+# In case this system is running systemd, we make systemd reload the unit files
+# to pick up changes.
+if [ -d /run/systemd/system ] ; then
+ systemctl --system daemon-reload >/dev/null || true
+fi
diff --git a/autoscripts/postrm-makeshlibs b/autoscripts/postrm-makeshlibs
new file mode 100644
index 00000000..96bf24ed
--- /dev/null
+++ b/autoscripts/postrm-makeshlibs
@@ -0,0 +1,3 @@
+if [ "$1" = "remove" ]; then
+ ldconfig
+fi
diff --git a/autoscripts/postrm-menu b/autoscripts/postrm-menu
new file mode 100644
index 00000000..a180558d
--- /dev/null
+++ b/autoscripts/postrm-menu
@@ -0,0 +1 @@
+if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi
diff --git a/autoscripts/postrm-menu-method b/autoscripts/postrm-menu-method
new file mode 100644
index 00000000..ffa1e486
--- /dev/null
+++ b/autoscripts/postrm-menu-method
@@ -0,0 +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
diff --git a/autoscripts/postrm-modules b/autoscripts/postrm-modules
new file mode 100644
index 00000000..c2577dd2
--- /dev/null
+++ b/autoscripts/postrm-modules
@@ -0,0 +1,3 @@
+if [ -e /boot/System.map-#KVERS# ]; then
+ depmod -a -F /boot/System.map-#KVERS# #KVERS# || true
+fi
diff --git a/autoscripts/postrm-sgmlcatalog b/autoscripts/postrm-sgmlcatalog
new file mode 100644
index 00000000..f8278e68
--- /dev/null
+++ b/autoscripts/postrm-sgmlcatalog
@@ -0,0 +1,3 @@
+if [ "$1" = "purge" ]; then
+ rm -f #CENTRALCAT#.old
+fi
diff --git a/autoscripts/postrm-suid b/autoscripts/postrm-suid
new file mode 100644
index 00000000..a4cfecf9
--- /dev/null
+++ b/autoscripts/postrm-suid
@@ -0,0 +1,4 @@
+if [ "$1" = remove ] && [ -e /etc/suid.conf ] && \
+ which suidunregister >/dev/null 2>&1; then
+ suidunregister -s #PACKAGE# /#FILE#
+fi
diff --git a/autoscripts/postrm-ucf b/autoscripts/postrm-ucf
new file mode 100644
index 00000000..da375726
--- /dev/null
+++ b/autoscripts/postrm-ucf
@@ -0,0 +1,12 @@
+if [ "$1" = "purge" ]; then
+ for ext in .ucf-new .ucf-old .ucf-dist ""; do
+ rm -f "#UCFDEST#$ext"
+ done
+
+ if [ -x "`which ucf 2>/dev/null`" ]; then
+ ucf --purge "#UCFDEST#"
+ fi
+ if [ -x "`which ucfr 2>/dev/null`" ]; then
+ ucfr --purge #PACKAGE# "#UCFDEST#"
+ fi
+fi
diff --git a/autoscripts/postrm-xfonts b/autoscripts/postrm-xfonts
new file mode 100644
index 00000000..cd476a3d
--- /dev/null
+++ b/autoscripts/postrm-xfonts
@@ -0,0 +1,3 @@
+if [ -x "`which update-fonts-dir 2>/dev/null`" ]; then
+ #CMDS#
+fi
diff --git a/autoscripts/preinst-emacsen b/autoscripts/preinst-emacsen
new file mode 100644
index 00000000..780fc697
--- /dev/null
+++ b/autoscripts/preinst-emacsen
@@ -0,0 +1,5 @@
+if ( [ "$1" = "install" ] || [ "$1" = "upgrade" ] ) \
+ && [ -e /var/lib/emacsen-common/state/package/installed/emacsen-common ]
+then
+ /usr/lib/emacsen-common/emacs-package-install --preinst #PACKAGE#
+fi
diff --git a/autoscripts/preinst-moveconffile b/autoscripts/preinst-moveconffile
new file mode 100644
index 00000000..619b4cef
--- /dev/null
+++ b/autoscripts/preinst-moveconffile
@@ -0,0 +1,9 @@
+if [ "$1" = install ] || [ "$1" = upgrade ]; then
+ if [ -e "#OLD#" ]; then
+ if [ "`md5sum \"#OLD#\" | sed -e \"s/ .*//\"`" = \
+ "`dpkg-query -W -f='${Conffiles}' #PACKAGE# | sed -n -e \"\\\\' #OLD# '{s/ obsolete$//;s/.* //p}\"`" ]
+ then
+ rm -f "#OLD#"
+ fi
+ fi
+fi
diff --git a/autoscripts/preinst-sgmlcatalog b/autoscripts/preinst-sgmlcatalog
new file mode 100644
index 00000000..96f06738
--- /dev/null
+++ b/autoscripts/preinst-sgmlcatalog
@@ -0,0 +1,8 @@
+if test -f #CENTRALCAT# -a "(" "$1" = "upgrade" -o "$1" = "install" -a -n "$2" ")" &&
+ ! dpkg-query -S #CENTRALCAT# >/dev/null 2>&1; then
+ # If the dpkg-query command returns non-zero, the central catalog is
+ # not owned by any package. This is due to an old behaviour of
+ # debhelper. Now that file becomes a conffile. In order to avoid a
+ # question during installation, we remove the old non-conffile.
+ mv #CENTRALCAT# #CENTRALCAT#.old
+fi
diff --git a/autoscripts/prerm-emacsen b/autoscripts/prerm-emacsen
new file mode 100644
index 00000000..31ecfaa4
--- /dev/null
+++ b/autoscripts/prerm-emacsen
@@ -0,0 +1,3 @@
+if [ -e /var/lib/emacsen-common/state/package/installed/emacsen-common ] ; then
+ /usr/lib/emacsen-common/emacs-package-remove --prerm #PACKAGE#
+fi
diff --git a/autoscripts/prerm-init b/autoscripts/prerm-init
new file mode 100644
index 00000000..2a8aa4c6
--- /dev/null
+++ b/autoscripts/prerm-init
@@ -0,0 +1,3 @@
+if [ -x "/etc/init.d/#SCRIPT#" ]; then
+ invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER#
+fi
diff --git a/autoscripts/prerm-init-norestart b/autoscripts/prerm-init-norestart
new file mode 100644
index 00000000..cacde6e3
--- /dev/null
+++ b/autoscripts/prerm-init-norestart
@@ -0,0 +1,3 @@
+if [ -x "/etc/init.d/#SCRIPT#" ] && [ "$1" = remove ]; then
+ invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER#
+fi
diff --git a/autoscripts/prerm-python b/autoscripts/prerm-python
new file mode 100644
index 00000000..e6e779f8
--- /dev/null
+++ b/autoscripts/prerm-python
@@ -0,0 +1,3 @@
+dpkg -L #PACKAGE# |
+ awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
+ xargs rm -f >&2
diff --git a/autoscripts/prerm-usrlocal b/autoscripts/prerm-usrlocal
new file mode 100644
index 00000000..baafc23e
--- /dev/null
+++ b/autoscripts/prerm-usrlocal
@@ -0,0 +1,7 @@
+(
+ while read dir; do
+ rmdir "$dir" 2>/dev/null || true
+ done
+) << DATA
+#JUSTDIRS#
+DATA
diff --git a/autoscripts/prerm-wm b/autoscripts/prerm-wm
new file mode 100644
index 00000000..b97d627f
--- /dev/null
+++ b/autoscripts/prerm-wm
@@ -0,0 +1,3 @@
+if [ "$1" = "remove" ]; then
+ update-alternatives --remove x-window-manager #WM#
+fi