dhcpcd-discuss

Re: interfaces are killed after boot

Daniel Huhardeaux

Sat Nov 23 14:40:48 2019

Le 23/11/2019 à 15:18, Daniel Huhardeaux a écrit :

Try this instead

PATHtoFW=/etc/network/if-post-up.d

if $if_up; then
     case "$protocol" in
         dhcp|ipv4ll) "$PATHtoFW/sfw4" "$interface";;
         ra|dhcp6|static6) "$PATHtoFW/sfw6" "$interface";;
     esac
fi

My script is only launched for eth0 ipv4 and what is strange, not all the script is executed ! It's a sh script which start nftables rules. Inside they are echo "bla bla ..." for debugging. Could this be the problem ? I don't find those datas in syslog, even using logger "..."

dhcpcd-run-hooks provires a syslog function

syslog err "This is an error"

I put the file 00-startFW in /etc/dhcpcd.exit-hook which contain

PATHtoFW=/etc/network/if-post-up.d




syslog warn "dhcpcd-exit-hooks - if_up=$if_up protocol=$protocol interface=$interface path=$PATHtoFW"

The script is NEVER executed on boot. I put it in /lib/dhcpcd/dhcpcd-hooks under the name 99-start-FW and here he is launched on boot, syslog warn as dhcpcd-hooks (see attached console file).

Think I found this: /etc/dhcpcd.exit-hook should not be a a directory but a file. Right ? Same for /etc/dhcpcd.enter-hook ...

--
Daniel
TOOTAi Networks

Follow-Ups:
Re: interfaces are killed after bootRoy Marples
References:
interfaces are killed after bootDaniel Huhardeaux
Re: interfaces are killed after bootRoy Marples
Re: interfaces are killed after bootDaniel Huhardeaux
Re: interfaces are killed after bootRoy Marples
Re: interfaces are killed after bootDaniel Huhardeaux
Archive administrator: postmaster@marples.name