bird systemd startup init debian

Rob Lister rob at lonap.net
Tue Mar 6 15:20:52 CET 2018


Yes - thanks for that hint :)

The error "bird: Unable to open configuration file /etc/bird/bird.conf" 
appears in red text while
the smaller more critical reason does not stand out so much.

BIRD_ARGS in /etc/init.d/bird seems not to work (something else is 
overriding it?)

Both bird and bird6 pick up from /etc/bird/envvars but we need to define 
separate configuration files for bird and bird6.

My eventual fix for this:-

cp /etc/bird/bird.conf /etc/bird/bird-vlanid1-ipv4.conf
cp /etc/bird/bird.conf /etc/bird/bird-vlanid1-ipv6.conf
rm /etc/bird/bird.conf

cp /etc/bird/envvars /etc/bird/envvars6

echo "BIRD_ARGS=\"-c /etc/bird/bird-vlanid1-ipv4.conf\"" >> envvars
echo "BIRD_ARGS=\"-c /etc/bird/bird-vlanid1-ipv6.conf\"" >> envvars6

systemctl edit bird :

# bird.service
[Service]
ExecStart=
ExecStart=/usr/sbin/bird -f -u $BIRD_RUN_USER -g $BIRD_RUN_GROUP 
$BIRD_ARGS
ExecStartPre=
ExecStartPre=/usr/sbin/bird -p -f -u $BIRD_RUN_USER -g $BIRD_RUN_GROUP 
$BIRD_ARGS

systemctl edit bird6 :
# bird6.service
[Service]
EnvironmentFile=
EnvironmentFile=/etc/bird/envvars6
ExecStart=
ExecStart=/usr/sbin/bird6 -f -u $BIRD_RUN_USER -g $BIRD_RUN_GROUP 
$BIRD_ARGS
ExecStartPre=
ExecStartPre=/usr/sbin/bird6 -p -f -u $BIRD_RUN_USER -g $BIRD_RUN_GROUP 
$BIRD_ARGS


On 2018-03-06 11:26, Toke Høiland-Jørgensen wrote:
>>    Process: 510 ExecStartPre=/usr/sbin/bird -p (code=exited,
>> status=1/FAILURE)
> 
> So this says that it's `bird -p` that fails. This is a check of the
> configuration file before the actual daemon is started. Since that is
> not passed the $BIRD_ARGS (as you can see from the command line
> invocation), it fails, which prevents startup of the actual daemon.
> 
> You'd have to add the same $BIRD_RUN_USER, $BIRD_RUN_GROUP and
> $BIRD_ARGS to the ExecStartPre line I guess; the fact that it is not
> there already is a bug in the systemd unit file, I'd say. I guess this
> is a packaging bug on the Debian side? In which case you should open a
> bug in the Debian system :)
> 
> -Toke

-- 
Rob Lister
rob at lonap.net


More information about the Bird-users mailing list