2014-06-02 13:44:02 +00:00
|
|
|
#!/bin/bash
|
2014-06-24 20:39:05 +00:00
|
|
|
#Used only by sysclone
|
2014-06-02 13:44:02 +00:00
|
|
|
|
|
|
|
# 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
|
2014-06-24 20:39:05 +00:00
|
|
|
# redhat/centos
|
|
|
|
echo "Running dracut to regenerate the initrd with the drivers needed by this node:"
|
|
|
|
dracut --force
|
2014-06-02 13:44:02 +00:00
|
|
|
else
|
2014-06-24 20:39:05 +00:00
|
|
|
# suse/sles
|
|
|
|
echo "Running mkinitrd to regenerate the initrd with the drivers needed by this node:"
|
|
|
|
mkinitrd
|
2014-06-02 13:44:02 +00:00
|
|
|
fi
|