Projects
openEuler:24.03
audit
_service:tar_scm:backport-Cleanup-shell-script-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-Cleanup-shell-script-warnings.patch of Package audit
From 79c1212ff38254a961c27d8eb10bc766e412ffe9 Mon Sep 17 00:00:00 2001 From: Steve Grubb <ausearch.1@gmail.com> Date: Fri, 23 Feb 2024 12:26:05 -0500 Subject: [PATCH] Cleanup shell script warnings Reference:https://github.com/linux-audit/audit-userspace/commit/79c1212ff38254a961c27d8eb10bc766e412ffe9 Conflict:init.d/augenrules, init.d/auditd.state --- init.d/auditd.reload | 2 +- init.d/auditd.resume | 2 +- init.d/auditd.rotate | 2 +- init.d/auditd.state | 6 +++--- init.d/auditd.stop | 2 +- init.d/augenrules | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/init.d/auditd.reload b/init.d/auditd.reload index 6db1bd74..b42fa6bf 100644 --- a/init.d/auditd.reload +++ b/init.d/auditd.reload @@ -3,7 +3,7 @@ # directly supported by systemd # Check that we are root ... so non-root users stop here -test $(id -u) = 0 || exit 4 +test "$(id -u)" = "0" || exit 4 PATH=/sbin:/bin:/usr/bin:/usr/sbin prog="auditd" diff --git a/init.d/auditd.resume b/init.d/auditd.resume index 96189eb6..8193bea9 100644 --- a/init.d/auditd.resume +++ b/init.d/auditd.resume @@ -3,7 +3,7 @@ # directly supported by systemd # Check that we are root ... so non-root users stop here -test $(id -u) = 0 || exit 4 +test "$(id -u)" = "0" || exit 4 PATH=/sbin:/bin:/usr/bin:/usr/sbin prog="auditd" diff --git a/init.d/auditd.rotate b/init.d/auditd.rotate index dcb12c26..8bb65530 100644 --- a/init.d/auditd.rotate +++ b/init.d/auditd.rotate @@ -3,7 +3,7 @@ # directly supported by systemd # Check that we are root ... so non-root users stop here -test $(id -u) = 0 || exit 4 +test "$(id -u)" = "0" || exit 4 PATH=/sbin:/bin:/usr/bin:/usr/sbin prog="auditd" diff --git a/init.d/auditd.state b/init.d/auditd.state index 6ae0845a..c59fe5a6 100644 --- a/init.d/auditd.state +++ b/init.d/auditd.state @@ -3,7 +3,7 @@ # directly supported by systemd # Check that we are root ... so non-root users stop here -test $(id -u) = 0 || exit 4 +test "$(id -u)" = "0" || exit 4 PATH=/sbin:/bin:/usr/bin:/usr/sbin prog="auditd" @@ -15,7 +15,7 @@ killproc $prog -CONT RETVAL=$? echo -e "\n" sleep 1 -if [ $? -eq 0 ] ; then +if [ $RETVAL -eq 0 ] ; then if [ -e $state_file ] ; then cat $state_file fi diff --git a/init.d/auditd.stop b/init.d/auditd.stop index 4cfe88b1..79e53a59 100644 --- a/init.d/auditd.stop +++ b/init.d/auditd.stop @@ -3,7 +3,7 @@ # directly supported by systemd # Check that we are root ... so non-root users stop here -test $(id -u) = 0 || exit 4 +test "$(id -u)" = "0" || exit 4 PATH=/sbin:/bin:/usr/bin:/usr/sbin prog="auditd" diff --git a/init.d/augenrules b/init.d/augenrules index be6c9f5c..8c1a670b 100644 --- a/init.d/augenrules +++ b/init.d/augenrules @@ -35,7 +35,7 @@ RETVAL=0 usage="Usage: $0 [--check|--load]" # Delete the interim file on faults -trap 'rm -f ${TmpRules}; exit 1' 1 2 3 13 15 +trap 'rm -f ${TmpRules}; exit 1' HUP INT QUIT PIPE TERM try_load() { if [ $LoadRules -eq 1 ] ; then -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2