]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- in case of empty HOSTNAME set it to what the kernel thinks it is
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 19 Mar 2007 17:27:37 +0000 (17:27 +0000)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 19 Mar 2007 17:27:37 +0000 (17:27 +0000)
  (for example workstation with kernel level IP config and / over NFS)

svn-id: @8383

rc.d/rc.sysinit

index a928cdd0b8f845391f90abb43b9bf95a2a8ab918..3591d3e2c40ab6eb00437b551b210b706197c784 100755 (executable)
@@ -129,6 +129,7 @@ if ! is_no "$RC_PROMPT"; then
 fi
 
 # Set the hostname
+[ -z "${HOSTNAME}" ] && HOSTNAME=$(hostname)
 run_cmd "$(nls 'Host:') ${HOSTNAME}" hostname ${HOSTNAME}
 
 # Set the NIS domain name
This page took 0.11481 seconds and 4 git commands to generate.