All pastes #217913 Raw Edit

Someone

public text v1 · immutable
#217913 ·published 2006-10-23 22:00 UTC
rendered paste body
stripcom() {
        local _file="$1"
        local _line

        {
                while read _line ; do
                        _line=${_line%%#*}              # strip comments
                        test -z "$_line" && continue
                        echo $_line
                done
        } < $_file
}


if [ "X${dhcpd_flags}" != X"NO" -a -f /etc/dhcpd.conf ]; then
        touch /var/db/dhcpd.leases
        if [ -f /etc/dhcpd.interfaces ]; then
                dhcpd_ifs=`stripcom /etc/dhcpd.interfaces`
        fi
        echo -n ' dhcpd';       echo /usr/sbin/dhcpd ${dhcpd_flags} ${dhcpd_ifs}
fi