]> git.proxmox.com Git - pve-kernel-jessie.git/commitdiff
setup kernel links for installation CD (rescue boot)
authorDietmar Maurer <dietmar@proxmox.com>
Sun, 10 Jan 2016 09:08:42 +0000 (10:08 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Sun, 10 Jan 2016 09:11:16 +0000 (10:11 +0100)
Makefile
proxmox-ve/changelog.Debian
proxmox-ve/postinst
proxmox-ve/postrm [new file with mode: 0755]

index cca3accd055d45a33e16f8c60b827eed4cf1a1f9..cd95a3d72e2a23dc2499be4bc97d24db4ebe74df 100644 (file)
--- 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/control >proxmox-ve/data/DEBIAN/control
-       install -m 0755 proxmox-ve/postinst proxmox-ve/data/DEBIAN/postinst
+       sed -e 's/@KVNAME@/${KVNAME}/' <proxmox-ve/postinst >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}
index 03526bd2abae50dd47426258289a53ab3f72d46d..4ef7cb990f76be62c6f2181173da41c39f3afe65 100644 (file)
@@ -1,3 +1,9 @@
+proxmox-ve (4.0-31) unstable; urgency=medium
+
+  * setup kernel links for installation CD (rescue boot)
+
+ -- Proxmox Support Team <support@proxmox.com>  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
index be375d28696eb94724df8ad6197337e783bce128..78e97e9b125e18321cbdc28db5946555891a18d6 100755 (executable)
@@ -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 (executable)
index 0000000..9735843
--- /dev/null
@@ -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
+