diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-03-15 20:20:48 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-03-15 20:20:48 +0100 |
commit | 5f92067308ad179e92b90c9e4d2bac150d1eb615 (patch) | |
tree | e69a185bcbe144dda8f571e87f2073558fe07cd8 /src/core | |
parent | 9c9206abdd83bd46dbc4b3c8dc6a9afec0d0f60e (diff) |
fix for extraneaous " at end of hostname in /etc/hosts
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 7c59c61..bae499d 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -58,7 +58,7 @@ interactive_configure_system() # note that if the user edits rc.conf several times to change the hostname more then once, we will add them all to /etc/hosts. this is not perfect, but to avoid this, too much code would be required (feel free to prove me wrong :)) if [ "$FILE" = "/etc/rc.conf" ] then - HOSTNAME=`sed -n '/^HOSTNAME/s/HOSTNAME=//p' ${var_TARGET_DIR}${FILE} | sed 's/"//'` + HOSTNAME=`sed -n '/^HOSTNAME/s/HOSTNAME=//p' ${var_TARGET_DIR}${FILE} | sed 's/"//g'` if ! grep '127\.0\.0\.1' ${var_TARGET_DIR}/etc/hosts | grep -q "$HOSTNAME" then sed -i "s/127\.0\.0\.1.*/& $HOSTNAME/" ${var_TARGET_DIR}/etc/hosts |