From c043b6f8a84a575ea5cedc71499a81414a610e70 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 23 Feb 2017 22:30:08 -0500 Subject: [PATCH] lib/neutron: Add neutron_deploy_rootwrap_filters Change-Id: Icfa2cfa662013324d38099b82ce0f58ed8377e60 --- lib/neutron | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/neutron b/lib/neutron index f277062b32..c43cb674ba 100644 --- a/lib/neutron +++ b/lib/neutron @@ -521,6 +521,13 @@ function neutron_server_config_add_new { _NEUTRON_SERVER_EXTRA_CONF_FILES_ABS+=($1) } +# neutron_deploy_rootwrap_filters() - deploy rootwrap filters +function neutron_deploy_rootwrap_filters_new { + local srcdir=$1 + sudo install -d -o root -g root -m 755 $NEUTRON_CONF_DIR/rootwrap.d + sudo install -o root -g root -m 644 $srcdir/etc/neutron/rootwrap.d/*.filters $NEUTRON_CONF_DIR/rootwrap.d +} + # Dispatch functions # These are needed for compatibility between the old and new implementations # where there are function name overlaps. These will be removed when @@ -626,5 +633,14 @@ function stop_neutron { fi } +function neutron_deploy_rootwrap_filters { + if is_neutron_legacy_enabled; then + # Call back to old function + _neutron_deploy_rootwrap_filters "$@" + else + neutron_deploy_rootwrap_filters_new "$@" + fi +} + # Restore xtrace $XTRACE