aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/package
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@intel.com>2013-06-24 10:38:22 -0400
committerMichal Marek <mmarek@suse.cz>2013-07-23 08:36:44 -0400
commit3c9c7a14b6274074cc3af2b83d56a92547188f27 (patch)
treee47e7021707352cdd165ecaf6204563bdc9f81ae /scripts/package
parentad81f0545ef01ea651886dddac4bef6cec930092 (diff)
rpm-pkg: add %post section to create initramfs and grub hooks
/sbin/installkernel is used to insure grub hooks are inserted and the initramfs is created on the target system. The invokation installkernel will work with any kernel as long as: - /sbin/installkernel exists - the kernel and sysem map files are readable Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/package')
-rwxr-xr-xscripts/package/mkspec9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index fdd3fbf4d4a4..0aa6a242a900 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -112,6 +112,15 @@ echo ""
112echo "%clean" 112echo "%clean"
113echo 'rm -rf $RPM_BUILD_ROOT' 113echo 'rm -rf $RPM_BUILD_ROOT'
114echo "" 114echo ""
115echo "%post"
116echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then"
117echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm"
118echo "cp /boot/System.map-$KERNELRELEASE /boot/System.map-$KERNELRELEASE-rpm"
119echo "rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE"
120echo "/sbin/installkernel $KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
121echo "rm -f /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
122echo "fi"
123echo ""
115echo "%files" 124echo "%files"
116echo '%defattr (-, root, root)' 125echo '%defattr (-, root, root)'
117echo "%dir /lib/modules" 126echo "%dir /lib/modules"