From: Dietmar Maurer Date: Sun, 10 Jan 2016 09:08:42 +0000 (+0100) Subject: setup kernel links for installation CD (rescue boot) X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=81c0c4aad56e754089eb152d538bee351434568d;p=pve-kernel-jessie.git setup kernel links for installation CD (rescue boot) --- diff --git a/Makefile b/Makefile index cca3acc..cd95a3d 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,9 @@ ${PVE_DEB} pve: proxmox-ve/control proxmox-ve/postinst mkdir -p proxmox-ve/data/usr/share/doc/${PVEPKG}/ install -m 0644 proxmox-ve/proxmox-release\@proxmox.com.pubkey proxmox-ve/data/usr/share/doc/${PVEPKG} sed -e 's/@KVNAME@/${KVNAME}/' -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@RELEASE@/${RELEASE}/' -e 's/@PKGREL@/${PKGREL}/' proxmox-ve/data/DEBIAN/control - install -m 0755 proxmox-ve/postinst proxmox-ve/data/DEBIAN/postinst + sed -e 's/@KVNAME@/${KVNAME}/' proxmox-ve/data/DEBIAN/postinst + chmod 0755 proxmox-ve/data/DEBIAN/postinst + install -m 0755 proxmox-ve/postrm proxmox-ve/data/DEBIAN/postrm echo "git clone git://git.proxmox.com/git/pve-kernel-4.0.git\\ngit checkout ${GITVERSION}" > proxmox-ve/data/usr/share/doc/${PVEPKG}/SOURCE install -m 0644 proxmox-ve/copyright proxmox-ve/data/usr/share/doc/${PVEPKG} install -m 0644 proxmox-ve/changelog.Debian proxmox-ve/data/usr/share/doc/${PVEPKG} diff --git a/proxmox-ve/changelog.Debian b/proxmox-ve/changelog.Debian index 03526bd..4ef7cb9 100644 --- a/proxmox-ve/changelog.Debian +++ b/proxmox-ve/changelog.Debian @@ -1,3 +1,9 @@ +proxmox-ve (4.0-31) unstable; urgency=medium + + * setup kernel links for installation CD (rescue boot) + + -- Proxmox Support Team Sun, 10 Jan 2016 10:10:37 +0100 + proxmox-ve (4.0-29) unstable; urgency=medium * depend on newest 4.2.6-1-pve kernel diff --git a/proxmox-ve/postinst b/proxmox-ve/postinst index be375d2..78e97e9 100755 --- a/proxmox-ve/postinst +++ b/proxmox-ve/postinst @@ -20,6 +20,11 @@ case "$1" in echo -n "installing proxmox release key: " /usr/bin/apt-key add '/usr/share/doc/proxmox-ve/proxmox-release@proxmox.com.pubkey' || /bin/true + # setup kernel links for installation CD (rescue boot) + mkdir -p /boot/pve + ln -sf /boot/vmlinuz-@KVNAME@ /boot/pve/vmlinuz + ln -sf /boot/initrd.img-@KVNAME@ /boot/pve/initrd.img + # There are three sub-cases: if test "${2+set}" != set; then # We're being installed by an ancient dpkg which doesn't remember diff --git a/proxmox-ve/postrm b/proxmox-ve/postrm new file mode 100755 index 0000000..9735843 --- /dev/null +++ b/proxmox-ve/postrm @@ -0,0 +1,19 @@ +#! /bin/sh + +# Abort if any command returns an error value +set -e + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + # remove kernel symlinks + rm -f /boot/pve/vmlinuz + rm -f /boot/pve/initrd.img + rmdir --ignore-fail-on-non-empty /boot/pve/ + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac +