1
0
mirror of synced 2026-04-28 21:17:30 +00:00

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:
steve
2006-10-19 17:04:18 +00:00
parent 3d31602934
commit 8f79f92a88
10 changed files with 34 additions and 28 deletions

View File

@@ -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

View File

@@ -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