File entrypoint.sh of Package bind-container

#!/bin/bash -eu

if [ $(basename "$1") = 'label-install' ] || [ $(basename "$1") = 'label-uninstall' ]; then
   exec "$@"
   exit 0
fi

if [ ! -f /host/etc/named.conf ]; then
    echo "ERROR: No config at /etc/named.conf present."
    echo "This likely means the install label wasn't executed"
    echo "Exiting..."
    exit 1
fi
rm /etc/named.conf
ln -s /host/etc/named.conf /etc/named.conf

if [ -f /var/lib/named/rndc.key ]; then
    ln -s /var/lib/named/rndc.key /etc/rndc.key
fi

if [ -d /host/etc/named.d ]; then
    rm -r /etc/named.d
    ln -s /host/etc/named.d /etc/named.d
fi

exec "$@"
openSUSE Build Service is sponsored by