Если я запускаю клиент openvpn, а затем запускаю dhclient tap0
чтобы получить IP-адрес, все работает нормально.
Когда та же команда вызывается openvpn из скрипта (опция up
):
#!/bin/sh
/sbin/dhclient tap0 || exit 1
exit 0
Это не удается:
dhclient[30524]: Sending on LPF/tap0/aa:aa:aa:12:23:e9
dhclient[30524]: Can't bind to dhcp address: Permission denied
dhclient[30524]: Please make sure there is no other dhcp server
dhclient[30524]: running and that there's no entry for dhcp or
dhclient[30524]: bootp in /etc/inetd.conf. Also make sure you
dhclient[30524]: are not running HP JetAdmin software, which
openvpn[30517]: WARNING: Failed running command (--up/--down): external program exited with error status: 1
openvpn[30517]: Exiting due to fatal error
dhclient[30524]: includes a bootp server.
dhclient[30524]:
dhclient[30524]: If you think you have received this message due to a bug rather
dhclient[30524]: than a configuration issue please read the section on submitting
dhclient[30524]: bugs on either our web page at www.isc.org or in the README file
dhclient[30524]: before submitting a bug. These pages explain the proper
dhclient[30524]: process and the information we find helpful for debugging..
dhclient[30524]:
dhclient[30524]: exiting.
systemd[1]: openvpn-client.service: Main process exited, code=exited, status=1/FAILURE
Все запускаются с правами root, поэтому не должно быть проблем с разрешениями.