diff options
author | maximilian attems <maks@debian.org> | 2006-05-20 12:14:44 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2006-05-20 12:14:44 +0200 |
commit | 02b32f0a24c8e0724bca66ef57f144c4d708dce2 (patch) | |
tree | 13f460a6006fd7a5229304a210b07ac3288ff694 /debian/initramfs-tools.preinst | |
parent | c29d49d84418075e1887c965d978c7cc0e07a95f (diff) | |
download | initramfs-tools-02b32f0a24c8e0724bca66ef57f144c4d708dce2.tar.gz initramfs-tools-02b32f0a24c8e0724bca66ef57f144c4d708dce2.zip |
- mv /etc/mkinitramfs /etc/initramfs-tools
upgrade handling on preinst
- update TODO
- update bug script
Diffstat (limited to 'debian/initramfs-tools.preinst')
-rw-r--r-- | debian/initramfs-tools.preinst | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 3582290..3ec83c6 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -2,13 +2,30 @@ set -e -[ -f /etc/mkinitramfs/initramfs.conf ] && . /etc/mkinitramfs/initramfs.conf +case "$1" in + upgrade) + if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.61"; then + if [ -d /etc/initramfs-tools ]; then + echo + echo "Warning: /etc/initramfs-tools already exists." + echo " Please remove it for upgrade." + echo + exit 1 + fi + if [ -d /etc/mkinitramfs ]; then + mv /etc/mkinitramfs /etc/initramfs-tools + fi + fi + ;; +esac + +[ -f /etc/initramfs-tools/initramfs.conf ] && . /etc/initramfs-tools/initramfs.conf if [ -z ${RESUME} ]; then exit 0 else - mkdir -p /etc/mkinitramfs/conf.d - echo "RESUME=${RESUME}" > /etc/mkinitramfs/conf.d/resume - sed -i -e "s/RESUME=.*/#RESUME=/" /etc/mkinitramfs/initramfs.conf + mkdir -p /etc/initramfs-tools/conf.d + echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume + sed -i -e "s/RESUME=.*/#RESUME=/" /etc/initramfs-tools/initramfs.conf fi #DEBHELPER# |