|
|
@@ -16,3 +16,20 @@ heal_iptables_links() {
|
|
|
fi
|
|
|
done
|
|
|
}
|
|
|
+heal_ip6tables_links() {
|
|
|
+ packages="ip6tables ip6tables-save ip6tables-restore"
|
|
|
+ for package in $packages; do
|
|
|
+ if [ ! -e "/sbin/${package}" ]; then
|
|
|
+ if which ${package}; then
|
|
|
+ ln -s "$(which ${package})" /sbin/${package}
|
|
|
+ elif [ -e "/usr/sbin/${package}" ]; then
|
|
|
+ ln -s /usr/sbin/${package} /sbin/${package}
|
|
|
+ elif whereis -B /bin /sbin /usr/bin /usr/sbin -f -b ${package}; then
|
|
|
+ autoiptables=$(whereis -B /bin /sbin /usr/bin /usr/sbin -f -b ${package} | cut -d '' -f 2)
|
|
|
+ if [ -x "$autoiptables" ]; then
|
|
|
+ ln -s "$autoiptables" /sbin/${package}
|
|
|
+ fi
|
|
|
+ fi
|
|
|
+ fi
|
|
|
+ done
|
|
|
+}
|