Currently the scripts in xensever/ are intended specifically for XenServer,
but supporting other distros seems like a worthy goal, so this is a step
in the right direction.
It would be good to be able to determine a suitable system-type and
system-version, but those are less important than system-id.
Signed-off-by: Patrick Mullaney <pm.mullaney@gmail.com>
[changed not to set xs-system-uuid on non-XenServer systems]
[whitespace changes]
[changed to handle missing uuidgen, suggested by Justin Pettit]
Signed-off-by: Ben Pfaff <blp@nicira.com>
external-ids:system-id="$INSTALLATION_UUID" \
external-ids:xs-system-uuid="$INSTALLATION_UUID"
else
- action "Configuring Open vSwitch system IDs" false
+ if test -f /etc/openvswitch/install_uuid.conf; then
+ . /etc/openvswitch/install_uuid.conf
+ elif INSTALLATION_UUID=`uuidgen`; then
+ echo "INSTALLATION_UUID=$INSTALLATION_UUID" > /etc/openvswitch/install_uuid.conf
+ else
+ log_failure_msg "missing uuidgen, could not generate system UUID"
+ return
+ fi
+ $vsctl --no-wait --timeout=5 set Open_vSwitch . \
+ external-ids:system-id="$INSTALLATION_UUID"
+ action "Configuring Open vSwitch system IDs" true
fi
}