|
|
|
|
|
|
|
|
|
|
xen-api
[Xen-API] [PATCH 22 of 33] interface-reconfigure: move /etc/init.d/manag
It logically belongs alongside interface-reconfigure.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
diff -r d51959c290a2 -r e74e2f09d0ee scripts/OMakefile
--- a/scripts/OMakefile Fri Dec 18 14:16:32 2009 +0000
+++ b/scripts/OMakefile Fri Dec 18 14:16:32 2009 +0000
@@ -31,6 +31,7 @@
$(IPROG) init.d-xapissl $(DIST)/staging/etc/rc.d/init.d/xapissl
$(IPROG) init.d-xapi-domains
$(DIST)/staging/etc/rc.d/init.d/xapi-domains
$(IPROG) init.d-squeezed $(DIST)/staging/etc/rc.d/init.d/squeezed
+ $(IPROG) init.d-management-interface
$(DIST)/staging/etc/rc.d/init.d/management-interface
$(IDATA) squeezed-logrotate $(DIST)/staging/etc/logrotate.d/squeezed
$(IPROG) init.d-v6d $(DIST)/staging/etc/rc.d/init.d/v6d
$(IDATA) v6d-logrotate $(DIST)/staging/etc/logrotate.d/v6d
diff -r d51959c290a2 -r e74e2f09d0ee scripts/init.d-management-interface
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/init.d-management-interface Fri Dec 18 14:16:32 2009 +0000
@@ -0,0 +1,65 @@
+#!/bin/bash
+#
+# Bring up XenServer management interface
+#
+# chkconfig: 2345 13 76
+# description: Bring up XenServer management interface
+
+. /etc/init.d/functions
+
+export XENSOURCE_INVENTORY=/etc/xensource-inventory
+export INTERFACE_RECONFIGURE=/opt/xensource/libexec/interface-reconfigure
+
+[ -r ${XENSOURCE_INVENTORY} ] || exit 0
+. ${XENSOURCE_INVENTORY}
+
+bring_up_mgmt_if() {
+ [ -n "${MANAGEMENT_INTERFACE}" ] || return 0
+ action $"Bringing up management interface ${MANAGEMENT_INTERFACE}: " \
+ ${INTERFACE_RECONFIGURE} --management --force-interface
${MANAGEMENT_INTERFACE} up
+ touch /var/lock/subsys/management-interface
+}
+
+bring_up_current_ifs(){
+ [ -n "${CURRENT_INTERFACES}" ] || return 0
+ for INTF in ${CURRENT_INTERFACES}; do
+ [ ${INTF} != ${MANAGEMENT_INTERFACE} ] || continue
+ action $"Bringing up additional interface ${INTF}: " \
+ ${INTERFACE_RECONFIGURE} --force-interface ${INTF} up
+ done
+}
+
+start() {
+ bring_up_mgmt_if
+ bring_up_current_ifs
+}
+
+stop() {
+ [ -n "${INSTALLATION_UUID}" ] || return 0
+ echo -n
+ rm -f /var/lock/subsys/management-interface
+ PIF=$(xe pif-list host-uuid="${INSTALLATION_UUID}" management=true
--minimal)
+ [ -n "${PIF}" ] || return 0
+ action $"Storing management interface configuration: " \
+ ${INTERFACE_RECONFIGURE} --pif-uuid "${PIF}" --management
rewrite-configuration
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ *)
+ echo "Unknown action '$1'."
+ ;;
+esac
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-API] [PATCH 11 of 33] interface-reconfigure: Add run_command utility to encapsulate os.spawnl usage, (continued)
- [Xen-API] [PATCH 11 of 33] interface-reconfigure: Add run_command utility to encapsulate os.spawnl usage, Ian Campbell
- [Xen-API] [PATCH 12 of 33] interface-reconfigure: Add pif_is_vlan utility function, Ian Campbell
- [Xen-API] [PATCH 13 of 33] interface-reconfigure: do not remove ifcfg files when unplugging a PIF, Ian Campbell
- [Xen-API] [PATCH 14 of 33] interface-reconfigure: Write DNSDEV to /etc/sysconfig/network, Ian Campbell
- [Xen-API] [PATCH 17 of 33] interface-reconfigure: Rename some functions to match vswitch version, Ian Campbell
- [Xen-API] [PATCH 15 of 33] interface-reconfigure: Various refactoring, Ian Campbell
- [Xen-API] [PATCH 18 of 33] interface-reconfigure: use the same other-config:ethtool-* and MTU as vswitch version, Ian Campbell
- [Xen-API] [PATCH 20 of 33] interface-reconfigure: add pif_is_bond(), Ian Campbell
- [Xen-API] [PATCH 19 of 33] interface-reconfigure: further separate the concept of ipdev and datapath, Ian Campbell
- [Xen-API] [PATCH 21 of 33] interface-reconfigure: explicitly rename devices early, Ian Campbell
- [Xen-API] [PATCH 22 of 33] interface-reconfigure: move /etc/init.d/management-interface to this repository,
Ian Campbell <=
- [Xen-API] [PATCH 23 of 33] interface-reconfigure: Do not try to bring down interfaces before forcing them up, Ian Campbell
- [Xen-API] [PATCH 24 of 33] interface-reconfigure: do not require a PIF for rewrite action, Ian Campbell
- [Xen-API] [PATCH 25 of 33] interface-reconfigure: Refactor the action_* methods, Ian Campbell
- [Xen-API] [PATCH 27 of 33] interface-reconfigure: Move bond and VLAN utilities to utility module, Ian Campbell
- [Xen-API] [PATCH 29 of 33] interface-reconfigure: Move ethtool and MTU setting utilities to module, Ian Campbell
- [Xen-API] [PATCH 28 of 33] interface-reconfigure: do not sort the result in pif_get_bond_slaves, Ian Campbell
- [Xen-API] [PATCH 26 of 33] interface-reconfigure: Move DatabaseCache object to utility module, Ian Campbell
- [Xen-API] [PATCH 31 of 33] interface-reconfigure: Improve error handling of if{up, down} if ifcfg, Ian Campbell
- [Xen-API] [PATCH 32 of 33] interface-reconfigure: Add license headers to new InterfaceReconfigure*.py, Ian Campbell
|
|
|
|
|