File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 7979 if dpkg-query -W -f' ${Status}' " netplan*" 2> /dev/null | grep -q " ok installed" ; then
8080 preup=" /usr/lib/networkd-dispatcher/routable.d/50-ifup-hooks"
8181 if [ ! -e " $preup " ]; then
82+ for iface in $( ip token | awk -F ' dev ' ' {print $2}' ) ; do
83+ if [ -z " $interfaces " ]; then
84+ interfaces=" \"\$ IFACE\" ==\" $iface \" "
85+ else
86+ interfaces=" $interfaces || \"\$ IFACE\" ==\" $iface \" " ;
87+ fi
88+ done
8289 IFS=' %'
8390 echo ' #!/bin/bash' > $preup
8491 echo ' ' >> $preup
85- echo ' if [ "$IFACE" == " ' $( /bin/ip token | awk -F ' dev ' ' {print $2} ' ) ' " ]; then' >> $preup
92+ echo ' if [[ ' $interfaces ' ] ]; then' >> $preup
8693 echo ' sleep 3' >> $preup
8794 echo ' /sbin/iptables-restore < /etc/iptables.rules' >> $preup
8895 echo ' fi' >> $preup
You can’t perform that action at this time.
0 commit comments