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

为什么 ifup 没有运行所有 if-pre-up.d 脚本?
$ 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 没有运行?是否有其他位置设置了预备脚本列表?

答案1

我也遇到了同样的问题。据我所知,如果您删除结尾的“.sh”,则应该可以正常工作。

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

答案2

我在 ubuntu 20.4 中也无法工作。脚本名为 iptablesload,位于 if-pre-up.d 目录中。

我必须做

安装 ifupdown

这应该可以解决 U 20.4 的问题,对我来说确实如此。

相关内容