]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/initscripts/init.d/localnet
iptables: Replace state module by conntrack module.
[people/teissler/ipfire-2.x.git] / src / initscripts / init.d / localnet
index 7a19b6d547c808e7a4d2fa372094c9549b2f187b..c1e5b2933c339ca19512172d6e5079fae75349ee 100644 (file)
 
 . /etc/sysconfig/rc
 . ${rc_functions}
-. /var/ipfire/main/settings
 
 case "${1}" in
        start)
+               eval $(/usr/local/bin/readhash /var/ipfire/main/settings)
                boot_mesg "Bringing up the loopback interface..."
                ip addr add 127.0.0.1/8 label lo dev lo
                ip link set lo up
@@ -26,6 +26,12 @@ case "${1}" in
                boot_mesg "Setting hostname to ${HOSTNAME}..."
                hostname ${HOSTNAME}
                evaluate_retval
+
+               if [ -z "$DOMAINNAME" ]; then
+                       boot_mesg "Setting domainname to ${DOMAINNAME}..."
+                       domainname ${DOMAINNAME}
+                       evaluate_retval
+               fi
                ;;
 
        stop)
@@ -41,6 +47,7 @@ case "${1}" in
                ;;
 
        status)
+               eval $(/usr/local/bin/readhash /var/ipfire/main/settings)
                echo "Hostname is: $(hostname)"
                ip link show lo
                ;;