26a3d7e6d0
This change fixes few linting errors which are discovered by newer linters. - bashate: consistent 4 chars identation - python unamed Exceptions - python space around operators - python space after # comments - python unused imports - python unknown escapes (errors after py36) - python double newline before methods Change-Id: I5d2f37d1c820b1983355be60c09de581a72e08e0 Needed-By: https://review.opendev.org/#/c/665445/
11 lines
191 B
Bash
Executable File
11 lines
191 B
Bash
Executable File
#!/bin/bash
|
|
|
|
file="${1:-root}"
|
|
if [ -f /var/spool/cron/${file} ]; then
|
|
nb_lines=$(grep -cEv '^#' /var/spool/cron/${file})
|
|
if [ $nb_lines -ge 2 ]; then
|
|
exit 0
|
|
fi
|
|
fi
|
|
exit 1
|