Kernel packaging: do not remove initrd images on upgrade

This commit is contained in:
zador-blood-stained 2016-06-25 19:27:30 +03:00
parent 40d1cab1dc
commit 4bccb76674
22 changed files with 22 additions and 22 deletions

View file

@ -186,7 +186,7 @@ index 152d4d2..9b30ad2 100644
+ +
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -186,7 +186,7 @@ index 152d4d2..9b30ad2 100644
+ +
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -139,7 +139,7 @@ index 6c3b038..cc9b3c0 100755
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+umount /boot; +umount /boot;
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -245,7 +245,7 @@ index 3001ec5..dc76d3c
+ +
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -139,7 +139,7 @@ index 6c3b038..cc9b3c0 100755
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+umount /boot; +umount /boot;
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -186,7 +186,7 @@ index 152d4d2..9b30ad2 100644
+ +
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -245,7 +245,7 @@ index 3001ec5..dc76d3c
+ +
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -201,7 +201,7 @@ index 152d4d2..a2fa373 100644
+ +
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -245,7 +245,7 @@ index 3001ec5..dc76d3c
+ +
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -139,7 +139,7 @@ index 6c3b038..cc9b3c0 100755
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+umount /boot; +umount /boot;
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -229,7 +229,7 @@ index 3001ec5..04a6afb
+ +
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/Image* /boot/initrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/Image*
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -245,7 +245,7 @@ index 3001ec5..dc76d3c
+ +
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -218,7 +218,7 @@ index ed7ccdc..bf30624 100644
+cat >> $tmpdir/DEBIAN/preinst <<EOT +cat >> $tmpdir/DEBIAN/preinst <<EOT
+# exit if we are running chroot +# exit if we are running chroot
+if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi +if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/initrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+ +
+check_and_unmount (){ +check_and_unmount (){
+boot_device=\$(mountpoint -d /boot) +boot_device=\$(mountpoint -d /boot)

View file

@ -218,7 +218,7 @@ index ed7ccdc..bf30624 100644
+cat >> $tmpdir/DEBIAN/preinst <<EOT +cat >> $tmpdir/DEBIAN/preinst <<EOT
+# exit if we are running chroot +# exit if we are running chroot
+if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi +if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/initrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+ +
+check_and_unmount (){ +check_and_unmount (){
+boot_device=\$(mountpoint -d /boot) +boot_device=\$(mountpoint -d /boot)

View file

@ -218,7 +218,7 @@ index ed7ccdc..bf30624 100644
+cat >> $tmpdir/DEBIAN/preinst <<EOT +cat >> $tmpdir/DEBIAN/preinst <<EOT
+# exit if we are running chroot +# exit if we are running chroot
+if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi +if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/initrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+ +
+check_and_unmount (){ +check_and_unmount (){
+boot_device=\$(mountpoint -d /boot) +boot_device=\$(mountpoint -d /boot)

View file

@ -218,7 +218,7 @@ index ed7ccdc..bf30624 100644
+cat >> $tmpdir/DEBIAN/preinst <<EOT +cat >> $tmpdir/DEBIAN/preinst <<EOT
+# exit if we are running chroot +# exit if we are running chroot
+if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi +if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/initrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+ +
+check_and_unmount (){ +check_and_unmount (){
+boot_device=\$(mountpoint -d /boot) +boot_device=\$(mountpoint -d /boot)

View file

@ -139,7 +139,7 @@ index 6c3b038..cc9b3c0 100755
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+umount /boot; +umount /boot;
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -218,7 +218,7 @@ index ed7ccdc..bf30624 100644
+cat >> $tmpdir/DEBIAN/preinst <<EOT +cat >> $tmpdir/DEBIAN/preinst <<EOT
+# exit if we are running chroot +# exit if we are running chroot
+if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi +if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/initrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+ +
+check_and_unmount (){ +check_and_unmount (){
+boot_device=\$(mountpoint -d /boot) +boot_device=\$(mountpoint -d /boot)

View file

@ -139,7 +139,7 @@ index 6c3b038..cc9b3c0 100755
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+umount /boot; +umount /boot;
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -139,7 +139,7 @@ index 6c3b038..cc9b3c0 100755
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+umount /boot; +umount /boot;
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -186,7 +186,7 @@ index 152d4d2..9b30ad2 100644
+ +
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount

View file

@ -139,7 +139,7 @@ index 6c3b038..cc9b3c0 100755
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition) +bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
+if [ "\$bootfstype" = "vfat" ]; then +if [ "\$bootfstype" = "vfat" ]; then
+umount /boot; +umount /boot;
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd* +rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+fi +fi
+} +}
+mountpoint -q /boot && check_and_unmount +mountpoint -q /boot && check_and_unmount