2006-10-19 17:04:17 by steve
Portability fixups for using a non-bash shell. Patches from Eric Lemoine.
This commit is contained in:
@@ -34,7 +34,7 @@ mkdir -p ${prefix}/etc/conf.d
|
||||
#
|
||||
# A function to setup DHCP for our new image.
|
||||
#
|
||||
function setupDynamicNetworking
|
||||
setupDynamicNetworking ()
|
||||
{
|
||||
#
|
||||
# The host is using DHCP.
|
||||
@@ -55,7 +55,7 @@ E_O_DHCP
|
||||
#
|
||||
# A function to setup static IP addresses for our new image.
|
||||
#
|
||||
function setupStaticNetworking
|
||||
setupStaticNetworking ()
|
||||
{
|
||||
#
|
||||
# if $p2p is set then add a "pointtopoint" setting.
|
||||
@@ -104,7 +104,7 @@ E_O_STATIC
|
||||
#
|
||||
# Call the relevant function
|
||||
#
|
||||
if [[ -z "${dhcp}" ]]; then
|
||||
if [ -z "${dhcp}" ]; then
|
||||
logMessage "Setting up static networking"
|
||||
setupStaticNetworking
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ echo DNSDOMAIN=\"${domain}\" >> ${prefix}/etc/conf.d/domainname
|
||||
# Fixup the /etc/hosts file upon the new image for
|
||||
# machines with static IPs
|
||||
#
|
||||
if [[ -z "${dhcp}" ]]; then
|
||||
if [ -z "${dhcp}" ]; then
|
||||
|
||||
# Non-IPv6 stuff.
|
||||
grep -v '\(::\|IPv6\)' /etc/hosts > ${prefix}/etc/hosts
|
||||
@@ -63,7 +63,7 @@ fi
|
||||
#
|
||||
# Allow the host system to know the IP address of our new guest.
|
||||
#
|
||||
if [[ -z "${dhcp}" ]]; then
|
||||
if [ -z "${dhcp}" ]; then
|
||||
|
||||
if ( grep ${hostname} /etc/hosts > /dev/null ) ; then
|
||||
|
||||
|
||||
Reference in New Issue
Block a user