TT#84555 Check debug and messages files as optional

These files are created by rsyslog with default conf file. Usually it's
done after the deployment.sh's reboot.

But when NGCP is installed via installer package on existing debian
system there is no reboot between installation of rsyslog (as part of
NGCP) and ngcp-initial-configuration which modifies /etc/rsyslog.conf.
So in this case these files are not created.

So check the ownership and permission of these files only if they exist.

Change-Id: I33be13a4e78baee3926de8bd0135d655b89d5bb6
(cherry picked from commit bac90e73dd)
mr8.5.2
Mykola Malkov 6 years ago
parent 430283807e
commit ff28cfbcb3

@ -42,20 +42,6 @@ file:
group: adm
filetype: file
/var/log/debug:
exists: true
mode: "0640"
owner: root
group: adm
filetype: file
/var/log/messages:
exists: true
mode: "0640"
owner: root
group: adm
filetype: file
/var/log/ngcp/api.log:
exists:
@ -159,3 +145,51 @@ command:
- '!/./'
stderr:
- '!/./'
# optionally existing files
# /var/log/debug
"find /var/log/ -type f -name debug ! -user root":
exit-status: 0
stdout:
- '!/./'
stderr:
- '!/./'
"find /var/log/ -type f -name debug ! -group adm":
exit-status: 0
stdout:
- '!/./'
stderr:
- '!/./'
"find /var/log/ -type f -name debug ! -perm 640":
exit-status: 0
stdout:
- '!/./'
stderr:
- '!/./'
# /var/log/messages
"find /var/log/ -type f -name messages ! -user root":
exit-status: 0
stdout:
- '!/./'
stderr:
- '!/./'
"find /var/log/ -type f -name messages ! -group adm":
exit-status: 0
stdout:
- '!/./'
stderr:
- '!/./'
"find /var/log/ -type f -name messages ! -perm 640":
exit-status: 0
stdout:
- '!/./'
stderr:
- '!/./'

Loading…
Cancel
Save