Skip to content

Commit

Permalink
Merge branch 'branches/rudder/6.2' into branches/rudder/7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ncharles committed Mar 9, 2023
2 parents 5f9bb61 + 5403de6 commit 13d4215
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion ansible-policies/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e
PLUGIN_FULL_NAME="rudder-plugin-ansible-policies"
PRETTY_NAME="Ansible Policies"
CONFIGURATION_PATH=/var/rudder/packages/$PLUGIN_FULL_NAME
Expand Down
2 changes: 1 addition & 1 deletion ansible-policies/packaging/prerm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e
PLUGIN_FOLDER="/var/rudder/packages/rudder-plugin-ansible-policies"

# Remove techniques
Expand Down
2 changes: 1 addition & 1 deletion api-authorizations/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e
# create table for Rudder data sources plugin:
# note that if you installed Rudder 4.1~alpha or 4.1~beta1, or a previous version
# of the plugin, you can skip that step (which would fail with a "table exists" error)
Expand Down
2 changes: 1 addition & 1 deletion auth-backends/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e
# add post-installation script, like:

# psql -U rudder -h localhost -d rudder -f /opt/rudder/share/plugins/authbackends/AuthBackends-schema.sql
Expand Down
2 changes: 1 addition & 1 deletion branding/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
set -xe
set -e

2 changes: 1 addition & 1 deletion change-validation/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e
SQL_CREDENTIALS=$(grep -c -E "^rudder.jdbc.(username|password)[ \t]*=" /opt/rudder/etc/rudder-web.properties || true)

if [ -f /opt/rudder/etc/rudder-web.properties -a ${SQL_CREDENTIALS} -eq 2 ]; then
Expand Down
2 changes: 1 addition & 1 deletion cis/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e
CONFIG_REPO=/var/rudder/configuration-repository
CATEGORY="{category}"
C_CATEGORY=$(echo $CATEGORY | sed "s/[^a-zA-Z0-9_]/_/g")
Expand Down
2 changes: 1 addition & 1 deletion cis/packaging/prerm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e
NAME="{plugin-id}"
PLUGIN_FOLDER="/var/rudder/packages/rudder-plugin-${NAME}"

Expand Down
2 changes: 1 addition & 1 deletion datasources/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e
# Postinstall for Rudder datasource plugin
RUDDER_OPT="/opt/rudder"

Expand Down
2 changes: 1 addition & 1 deletion glpi/bin/glpi-plugin
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ case "${ACTION}" in
;;

send-one)
INV=$(ls -1 "${INVENTORIES_DIR}" | egrep "$2.*\.ocs$")
echo "[ ] Sending inventory ${INVENTORIES_DIR}/${INV} to GLPI..."
#shellcheck disable=SC2012
INV=$(ls -1 "${INVENTORIES_DIR}" | egrep "$2.*\.ocs$")
FIC="${INVENTORIES_DIR}"/"${INV}"
[ ! -r "${FIC}" ] && echo "No file candidate for $2" && exit 1
send_inventory "${INVENTORIES_DIR}"/"${INV}"
Expand Down
2 changes: 1 addition & 1 deletion glpi/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e
CONFFILE="/opt/rudder/etc/glpi.conf"

echo "15 7 * * * /opt/rudder/bin/glpi-plugin send-all" > /etc/cron.d/glpi-rudder
Expand Down
2 changes: 1 addition & 1 deletion helloworld/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
set -xe
set -e
2 changes: 1 addition & 1 deletion node-external-reports/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
set -xe
set -e

2 changes: 1 addition & 1 deletion notify/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e

CONFFILE="/opt/rudder/etc/notify.conf"

Expand Down
2 changes: 1 addition & 1 deletion openscap/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e
PLUGIN_NAME="openscap"
PRETTY_NAME="OpenSCAP Policies"
CONFIGURATION_PATH=/opt/rudder/share/plugins/$PLUGIN_NAME
Expand Down
2 changes: 1 addition & 1 deletion openscap/packaging/prerm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e
PLUGIN_FOLDER="/var/rudder/packages/rudder-plugin-openscap"

# Remove techniques
Expand Down
6 changes: 3 additions & 3 deletions qa-test
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ test_typos()

test_scripts()
{
# plugin packaging scripts (postinst, etc...) must have the set -xe enabled
# plugin packaging scripts (postinst, etc...) must have the set -e enabled
RESULT=0
find . -name "packaging" -type d -not -path "./src/*"|
while IFS="" read -r directory
do
for file in $directory/*; do
if sed -n '1p' $file | grep -q "#\!/bin/bash"; then
if ! grep -q "set -xe" "$file"; then
echo "$file does not seem to contain mandatory 'set -xe' line"
if ! grep -q "set -e" "$file"; then
echo "$file does not seem to contain mandatory 'set -e' line"
RESULT=1
fi
fi
Expand Down
5 changes: 0 additions & 5 deletions scale-out-relay/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#!/bin/bash
set -e

# Force policy regeneration at restart
touch /opt/rudder/etc/trigger-policy-generation
cp /opt/rudder/share/plugins/scale-out-relay/server-node-to-relay /opt/rudder/share/commands/
cp /opt/rudder/share/plugins/scale-out-relay/server-relay-to-node /opt/rudder/share/commands/
echo "Plugin scale-out-relay successfully installed"
2 changes: 1 addition & 1 deletion user-management/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e

# add post-installation script, like:

Expand Down
2 changes: 1 addition & 1 deletion zabbix/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -xe
set -e

CONFFILE="/opt/rudder/etc/zabbix.conf"

Expand Down

0 comments on commit 13d4215

Please sign in to comment.