Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux General Discussion (http://www.linux-archive.org/archlinux-general-discussion/)
-   -   Bashify hostname and nisdomainnname setting. (http://www.linux-archive.org/archlinux-general-discussion/393321-bashify-hostname-nisdomainnname-setting.html)

Victor Lowther 06-30-2010 09:47 PM

Bashify hostname and nisdomainnname setting.
 
---
rc.sysinit | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/rc.sysinit b/rc.sysinit
index 217dacf..5842a57 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -287,14 +287,14 @@ stat_done

#status "Updating Shared Library Links" /sbin/ldconfig

-if [ "$HOSTNAME" != "" ]; then
- status "Setting Hostname: $HOSTNAME" /bin/hostname $HOSTNAME
+if [[ $HOSTNAME ]]; then
+ status "Setting Hostname: $HOSTNAME" /bin/hostname "$HOSTNAME"
fi

# Set the NIS domain name, if necessary
-[ -f /etc/conf.d/nisdomainname ] && . /etc/conf.d/nisdomainname
-if [ "$NISDOMAINNAME" != "" ]; then
- status "Setting NIS Domain Name: $NISDOMAINNAME" /bin/nisdomainname $NISDOMAINNAME
+[[ -f /etc/conf.d/nisdomainname ]] && . /etc/conf.d/nisdomainname
+if [[ $NISDOMAINNAME ]]; then
+ status "Setting NIS Domain Name: $NISDOMAINNAME" /bin/nisdomainname "$NISDOMAINNAME"
fi

status "Updating Module Dependencies" /sbin/depmod -A
--
1.7.1


All times are GMT. The time now is 02:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.