You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
911 B
36 lines
911 B
9 months ago
|
#!/bin/bash
|
||
|
|
||
|
# set +e
|
||
|
set -x
|
||
|
|
||
|
echo "Тест на корректность формирования команд политик"
|
||
|
|
||
|
source library/sh_lib.sh
|
||
|
|
||
|
check=0
|
||
|
|
||
|
######################################
|
||
|
echo "Test 1. Files presence test"
|
||
|
ls -l /usr/share/crypto-policies/reload-cmds.sh
|
||
|
check=$(eq_is_success ${check} 0)
|
||
|
echo "---------------------------"
|
||
|
|
||
|
######################################
|
||
|
echo "Test 2. Command test"
|
||
|
|
||
|
# cat /usr/share/crypto-policies/reload-cmds.sh | grep auth_apply.sh
|
||
|
# /usr/share/crypto-policies-scripts/auth_apply.sh 2>/dev/null || :
|
||
|
s_cmd=$(cat /usr/share/crypto-policies/reload-cmds.sh | grep auth_apply.sh)
|
||
|
check=$(eq_is_success ${check} 0)
|
||
|
|
||
|
cat "$s_cmd"
|
||
|
if [[ "$s_cmd" == "/usr/share/crypto-policies-scripts/auth_apply.sh 2>/dev/null || :" ]]; then
|
||
|
echo "Command OK"
|
||
|
else
|
||
|
echo "Error: command not found"
|
||
|
let check+=1
|
||
|
fi
|
||
|
|
||
|
check_test_status ${check} "$0"
|
||
|
exit ${check}
|