mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-09 12:16:04 +00:00
contrib/rpm: install pre-up dispatcher script "10-ifcfg-rh-routes.sh" as no-wait
The main reason to introduce the "no-wait.d" dispatcher directory was "10-ifcfg-rh-routes.sh", which (as a pre-up script) delays activation. We even extracted the script to a separate package on RHEL to avoid delays by default. Invoke the script via no-wait.d.
This commit is contained in:
parent
7976edb723
commit
bc7ad75d99
|
@ -412,7 +412,8 @@ mkdir -p %{buildroot}%{_sysconfdir}/%{name}/dispatcher.d/pre-up.d
|
|||
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/dispatcher.d/pre-down.d
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/dispatcher.d/no-wait.d
|
||||
cp examples/dispatcher/10-ifcfg-rh-routes.sh %{buildroot}%{_sysconfdir}/%{name}/dispatcher.d/
|
||||
ln -s ../10-ifcfg-rh-routes.sh %{buildroot}%{_sysconfdir}/%{name}/dispatcher.d/pre-up.d/
|
||||
ln -s ../no-wait.d/10-ifcfg-rh-routes.sh %{buildroot}%{_sysconfdir}/%{name}/dispatcher.d/pre-up.d/
|
||||
ln -s ../10-ifcfg-rh-routes.sh %{buildroot}%{_sysconfdir}/%{name}/dispatcher.d/no-wait.d/
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/gnome-vpn-properties
|
||||
|
||||
|
@ -478,6 +479,7 @@ fi
|
|||
%dir %{_sysconfdir}/%{name}/dispatcher.d/pre-down.d
|
||||
%dir %{_sysconfdir}/%{name}/dispatcher.d/pre-up.d
|
||||
%dir %{_sysconfdir}/%{name}/dispatcher.d/no-wait.d
|
||||
%{_sysconfdir}/%{name}/dispatcher.d/no-wait.d/10-ifcfg-rh-routes.sh
|
||||
%{_sysconfdir}/%{name}/dispatcher.d/pre-up.d/10-ifcfg-rh-routes.sh
|
||||
%dir %{_sysconfdir}/%{name}/dnsmasq.d
|
||||
%dir %{_sysconfdir}/%{name}/VPN
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
# This should be installed in both dispatcher.d/ and
|
||||
# dispatcher.d/pre-up.d/
|
||||
|
||||
# pre-up scripts delay activation of the device. To reduce the delay,
|
||||
# it is adviced to install the script as symlink to no-wait.d directory.
|
||||
|
||||
if [ "$2" != "pre-up" -a "$2" != "down" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user