* luci/contrib/luci-addons: always create /var/etc in luci_ethers, fixes #113 - thank...
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 3 Sep 2008 22:33:53 +0000 (22:33 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 3 Sep 2008 22:33:53 +0000 (22:33 +0000)
contrib/package/luci-addons/dist/etc/init.d/luci_ethers

index 661e398..c3f5604 100644 (file)
@@ -15,9 +15,10 @@ apply_lease() {
 start() {
        if [ ! -L /etc/ethers ]; then
                test -f /etc/ethers && mv /etc/ethers /etc/ethers.local
 start() {
        if [ ! -L /etc/ethers ]; then
                test -f /etc/ethers && mv /etc/ethers /etc/ethers.local
-               test -d /var/etc || mkdir -p /var/etc
                ln -s /var/etc/ethers /etc/ethers
        fi
                ln -s /var/etc/ethers /etc/ethers
        fi
+
+       test -d /var/etc || mkdir -p /var/etc
        
        config_load luci_ethers
        config_foreach apply_lease static_lease
        
        config_load luci_ethers
        config_foreach apply_lease static_lease