Package frr: Скрипты

Post install

 
command -v systemd-tmpfiles >/dev/null && systemd-tmpfiles --create /lib/tmpfiles.d/frr.conf ||: || : 

/usr/sbin/post_service frr

# Create dummy files if they don't exist so basic functions can be used.
if [ ! -e /etc/frr/frr.conf ]; then
    echo "hostname `hostname`" > /etc/frr/frr.conf
    chown frr:frr /etc/frr/frr.conf
    chmod 640 /etc/frr/frr.conf
fi

#still used by vtysh, this way no error is produced when using vtysh
if [ ! -e /etc/frr/vtysh.conf ]; then
    touch /etc/frr/vtysh.conf
    chmod 640 /etc/frr/vtysh.conf
    chown frr:frrvty /etc/frr/vtysh.conf
fi
Pre install

1
2
3
4
5
groupadd -r -f frr
groupadd -r -f frrvty

useradd -r -g frr -G frrvty -d /var/lib/frr -s /sbin/nologin -c "FRRouting suite" frr >/dev/null 2>&1 ||:
usermod -G frrvty frr >/dev/null 2>&1 ||:
Pre uninstall

/usr/sbin/preun_service frr