Fix some bugs about disable kernel module
This commit is contained in:
parent
e109fe76c6
commit
eadba375b6
|
@ -60,9 +60,11 @@ apply () {
|
|||
else
|
||||
warn "$BLACKLIST_CONF is not set to blacklist, add to config file $HARBIAN_SEC_CONF_FILE"
|
||||
if [ -w $HARBIAN_SEC_CONF_FILE ]; then
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $BLACKLIST_CONF /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $BLACKLIST_CONF"
|
||||
else
|
||||
touch $HARBIAN_SEC_CONF_FILE
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $BLACKLIST_CONF /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $BLACKLIST_CONF"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -46,9 +46,11 @@ apply () {
|
|||
else
|
||||
warn "$MODULE_NAME is not set to blacklist, add to config file $HARBIAN_SEC_CONF_FILE"
|
||||
if [ -w $HARBIAN_SEC_CONF_FILE ]; then
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
else
|
||||
touch $HARBIAN_SEC_CONF_FILE
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -47,8 +47,10 @@ apply () {
|
|||
warn "$MODULE_NAME is not set to blacklist, add to config file $HARBIAN_SEC_CONF_FILE"
|
||||
if [ -w $HARBIAN_SEC_CONF_FILE ]; then
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
else
|
||||
touch $HARBIAN_SEC_CONF_FILE
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -45,9 +45,11 @@ apply () {
|
|||
else
|
||||
warn "$MODULE_NAME is not set to blacklist, add to config file $HARBIAN_SEC_CONF_FILE"
|
||||
if [ -w $HARBIAN_SEC_CONF_FILE ]; then
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
else
|
||||
touch $HARBIAN_SEC_CONF_FILE
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -45,9 +45,11 @@ apply () {
|
|||
else
|
||||
warn "$MODULE_NAME is not set to blacklist, add to config file $HARBIAN_SEC_CONF_FILE"
|
||||
if [ -w $HARBIAN_SEC_CONF_FILE ]; then
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
else
|
||||
touch $HARBIAN_SEC_CONF_FILE
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -45,9 +45,11 @@ apply () {
|
|||
else
|
||||
warn "$MODULE_NAME is not set to blacklist, add to config file $HARBIAN_SEC_CONF_FILE"
|
||||
if [ -w $HARBIAN_SEC_CONF_FILE ]; then
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
else
|
||||
touch $HARBIAN_SEC_CONF_FILE
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -45,9 +45,11 @@ apply () {
|
|||
else
|
||||
warn "$MODULE_NAME is not set to blacklist, add to config file $HARBIAN_SEC_CONF_FILE"
|
||||
if [ -w $HARBIAN_SEC_CONF_FILE ]; then
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
else
|
||||
touch $HARBIAN_SEC_CONF_FILE
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -45,9 +45,11 @@ apply () {
|
|||
else
|
||||
warn "$MODULE_NAME is not set to blacklist, add to config file $HARBIAN_SEC_CONF_FILE"
|
||||
if [ -w $HARBIAN_SEC_CONF_FILE ]; then
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
else
|
||||
touch $HARBIAN_SEC_CONF_FILE
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "install $MODULE_NAME /bin/true"
|
||||
add_end_of_file "$HARBIAN_SEC_CONF_FILE" "blacklist $MODULE_NAME"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -96,10 +96,12 @@ apply () {
|
|||
if [ -f $BLACKCONFILE ]; then
|
||||
warn "Add $BLACKRULE to $BLACKCONFILE"
|
||||
add_end_of_file $BLACKCONFILE "$BLACKRULE"
|
||||
add_end_of_file $BLACKCONFILE "blacklist usb_storage"
|
||||
else
|
||||
warn "Create $BLACKCONFILE and add $BLACKRULE to $BLACKCONFILE"
|
||||
touch $BLACKCONFILE
|
||||
chmod 644 $BLACKCONFILE
|
||||
add_end_of_file $BLACKCONFILE "blacklist usb_storage"
|
||||
add_end_of_file $BLACKCONFILE "$BLACKRULE"
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue