From 1068c2db5b508a81bf4dcef4c1a8af345e5e9fe5 Mon Sep 17 00:00:00 2001 From: huweihua Date: Thu, 19 Jun 2014 04:13:26 -0400 Subject: [PATCH] sysclone add feature: update delta change from golden client to target node --- xCAT/postscripts/makeinitrd | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 xCAT/postscripts/makeinitrd diff --git a/xCAT/postscripts/makeinitrd b/xCAT/postscripts/makeinitrd new file mode 100755 index 000000000..c4a33ddc9 --- /dev/null +++ b/xCAT/postscripts/makeinitrd @@ -0,0 +1,20 @@ +#!/bin/bash +#Used only by sysclone + +# This SI post-install script is needed because the initrd that autoyast/kickstart/ubuntu builds when installing +# sles/rh/ubuntu on the golden node may not have the drivers when that initrd runs on the node that is +# being deployed with this image (specifically, drivers to be able to mount the disk). +# So rebuild the initrd on the to-node after putting the image on the disk, but before rebooting. + +#todo: Make this script work on red hat by checking for dracut and using that if it exists. +# And do whatever is necessary on ubuntu. + +if [[ -f /sbin/dracut ]]; then + # redhat/centos + echo "Running dracut to regenerate the initrd with the drivers needed by this node:" + dracut --force +else + # suse/sles + echo "Running mkinitrd to regenerate the initrd with the drivers needed by this node:" + mkinitrd +fi