From a010fcb5f799bce8af5f497f4e2cbef75a2cdfb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Mart=C3=ADnez?= Date: Wed, 11 Sep 2019 08:59:12 +0200 Subject: [PATCH] meson: Move network-config directory creation to main install file The `ifcfg-rh` meson build file installs a new post install script to create the `network-config` directory. This has been moved to the main post install file so it's easier to find because all post install steps are together and it avoids and extra post install script execution. --- meson.build | 2 ++ src/settings/plugins/ifcfg-rh/meson.build | 3 --- tools/meson-post-install.sh | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 73f161485c..a5dea295fa 100644 --- a/meson.build +++ b/meson.build @@ -895,6 +895,8 @@ meson.add_install_script( nm_pkgstatedir, enable_docs ? 'install_docs' : '', nm_mandir, + enable_ifcfg_rh ? 'create_network_scripts' : '', + nm_sysconfdir, ) output = '\nSystem paths:\n' diff --git a/src/settings/plugins/ifcfg-rh/meson.build b/src/settings/plugins/ifcfg-rh/meson.build index f5cfff4c9d..9cda662a43 100644 --- a/src/settings/plugins/ifcfg-rh/meson.build +++ b/src/settings/plugins/ifcfg-rh/meson.build @@ -74,9 +74,6 @@ install_data( install_mode: 'rwxr-xr-x', ) -meson.add_install_script('sh', '-c', - 'mkdir -p $DESTDIR/@0@/sysconfig/network-scripts'.format(nm_sysconfdir)) - if enable_tests subdir('tests') endif diff --git a/tools/meson-post-install.sh b/tools/meson-post-install.sh index 76b44371b1..aaf3576da4 100755 --- a/tools/meson-post-install.sh +++ b/tools/meson-post-install.sh @@ -49,3 +49,7 @@ if [ "$6" = install_docs ]; then ln -f "${DESTDIR}${mandir}/man5/NetworkManager.conf.5" "${DESTDIR}${mandir}/man5/nm-system-settings.conf.5" fi +if [ "$8" = create_network_scripts ]; then + sysconfdir=$9 + mkdir -p "${DESTDIR}${sysconfdir}/sysconfig/network-scripts" +fi