mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-23 05:55:38 +01:00
3.1_bootloader_ownership.sh fix
This commit is contained in:
parent
f1dcd7431a
commit
ce76538f64
@ -40,6 +40,12 @@ apply () {
|
|||||||
|
|
||||||
# This function will check config parameters required
|
# This function will check config parameters required
|
||||||
check_config() {
|
check_config() {
|
||||||
|
|
||||||
|
is_pkg_installed "grub-pc"
|
||||||
|
if [ $FNRET != 0 ]; then
|
||||||
|
warn "Grub is not installed, not handling configuration"
|
||||||
|
exit 128
|
||||||
|
fi
|
||||||
does_user_exist $USER
|
does_user_exist $USER
|
||||||
if [ $FNRET != 0 ]; then
|
if [ $FNRET != 0 ]; then
|
||||||
crit "$USER does not exist"
|
crit "$USER does not exist"
|
||||||
|
@ -202,11 +202,12 @@ apt_check_updates()
|
|||||||
# Returns if a package is installed
|
# Returns if a package is installed
|
||||||
#
|
#
|
||||||
|
|
||||||
is_installed()
|
is_pkg_installed()
|
||||||
{
|
{
|
||||||
PKG_NAME=$1
|
PKG_NAME=$1
|
||||||
if `dpkg -s $PKG_NAME 2> /dev/null | grep -q '^Status: install '` ; then
|
if $(dpkg -s $PKG_NAME 2> /dev/null | grep -q '^Status: install ') ; then
|
||||||
FNRET=0
|
FNRET=0
|
||||||
fi
|
else
|
||||||
FNRET=1
|
FNRET=1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user