Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > 0a46d049c4126efa327400b4fa52da81 > files > 10

ovirt-node-3.0.0-5.0.fc18.noarch.rpm

#!/bin/bash
# local_boot_trigger.sh - access given URL to signal that node installation
# is done
#
# Scripts in /etc/ovirt-config-boot.d/ are executed just before the node is
# rebooted. This one calls an URL given as a boot parameter e.g.
# local_boot_trigger=http://cobbler.server.example.com/cblr/svc/op/nopxe/system/@HOSTNAME@
# where @HOSTNAME@ is replaced by $(hostname)
# In this example, Cobbler is triggered to change pxelinux config for that
# system to perform a local boot when /etc/cobbler/settings/pxe_just_once
# is set to 1.

trigger_url=
for i in $(cat /proc/cmdline); do
    case $i in
        local_boot_trigger=*)
            trigger_url=${i#local_boot_trigger=}
            ;;
    esac
done

if [ -n "$trigger_url" ]; then
    trigger_url=$(echo $trigger_url | sed -e "s/@HOSTNAME@/$(hostname)/")
    wget --no-check-certificate "$trigger_url" -O /dev/null
fi