Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #402 from cr3/401

(#401) Checking network status with nm-online
  • Loading branch information...
commit 3c62334b0390c154b14606105f11540e291ad384 2 parents a2625ba + 9529fde
@daniel-pittman daniel-pittman authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 lib/project_razor/model/redhat/6/os_boot.erb
View
11 lib/project_razor/model/redhat/6/os_boot.erb
@@ -1,9 +1,16 @@
#!/bin/bash
+# Wait for network to come up when using NetworkManager.
+if service NetworkManager status >/dev/null 2>&1 && type -P nm-online; then
+ nm-online -q --timeout=10 || nm-online -q -x --timeout=30
+ [ "$?" -eq 0 ] || exit 1
+fi
+
+# Configure hostname.
hostname <%= hostname %>
echo <%= hostname %> > /etc/hostname
-# this set of commands should convert the first local (but non-loopback) IP
+# This set of commands should convert the first local (but non-loopback) IP
# address in the /etc/hosts file to an entry that has the fully-qualified
# hostname and local hostname as part of the entry (so that tehse names can
# be resolved properly). A backup of the original file will be left in place
@@ -31,4 +38,4 @@ curl <%= callback_url("postinstall", "send_ips") %>/$node_ip
# get final script
curl <%= callback_url("postinstall", "boot") %> | sh
# Send final state
-curl <%= callback_url("postinstall", "final") %> &
+curl <%= callback_url("postinstall", "final") %> &
Please sign in to comment.
Something went wrong with that request. Please try again.