为什么ifup无法运行所有if-pre-up.d脚本?


11
$ ll /etc/network/if-pre-up.d/

total 20
drwxr-xr-x 2 root root 4096 Jan 15 16:43 ./
drwxr-xr-x 7 root root 4096 Jan 14 21:29 ../
-rwxr-xr-x 1 root root  344 Apr 28  2012 ethtool*
-rwxr-xr-x 1 root root  158 Jan 14 22:01 iptablesload.sh*
-rwxr-xr-x 1 root root 3839 May  3  2012 wireless-tools*
lrwxrwxrwx 1 root root   32 Dec  4 13:00 wpasupplicant -> ../../wpa_supplicant/ifupdown.sh*

$ sudo ifup --all -v

run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/avahi-autoipd
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/ethtool
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant

为什么iptablesload.sh无法运行?是否在其他位置设置了预脚本列表?

Answers:


14

我有同样的问题。据我所知,如果删除结尾的“ .sh”,它应该可以正常工作。

sudo mv /etc/network/if-pre-up.d/iptablesload{.sh,}

1
谢谢!Think需要对运行零件的联机帮助进行仔细检查。“如果没有给出--lsbsysinit选项和--regex选项,那么名称必须完全由ASCII大写和小写字母,ASCII数字,ASCII下划线和ASCII减连字符组成。” 似乎该句点不属于该字符集。
Aurimas 2014年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.