ifcfg-rh: add nm-ifup and nm-ifdown scripts

They're intended to be used via update-alternatives(8) as compatibility
shims for Red Hat systems without the legacy network control scripts.

While they're not strictly parts of the settings plugin, they're best
just installed along with it, since they're supposed to be available on
systems that use the ifcfg files.
This commit is contained in:
Lubomir Rintel 2018-05-21 17:06:09 +02:00
parent d52573d125
commit d815130468
3 changed files with 11 additions and 0 deletions

View File

@ -19,6 +19,7 @@ noinst_DATA =
sbin_PROGRAMS =
bin_PROGRAMS =
libexec_PROGRAMS =
dist_libexec_SCRIPTS =
lib_LTLIBRARIES =
plugin_LTLIBRARIES =
core_plugins =
@ -2201,6 +2202,10 @@ src_settings_plugins_ifcfg_rh_tests_test_ifcfg_rh_LDADD = \
$(src_settings_plugins_ifcfg_rh_tests_test_ifcfg_rh_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
dist_libexec_SCRIPTS += \
src/settings/plugins/ifcfg-rh/nm-ifup \
src/settings/plugins/ifcfg-rh/nm-ifdown
endif
EXTRA_DIST += \

View File

@ -0,0 +1,3 @@
#!/bin/sh
nmcli connection load "/etc/sysconfig/network-scripts/ifcfg-$1" &&
exec nmcli connection down filename "/etc/sysconfig/network-scripts/ifcfg-$1"

View File

@ -0,0 +1,3 @@
#!/bin/sh
nmcli connection load "/etc/sysconfig/network-scripts/ifcfg-$1" &&
exec nmcli connection up filename "/etc/sysconfig/network-scripts/ifcfg-$1"