Various fixes

This commit is contained in:
Tad 2018-08-26 20:32:19 -04:00
parent 09fe9b212a
commit 44a192b7a4
5 changed files with 9 additions and 10 deletions

View file

@ -301,8 +301,8 @@ hardenDefconfig() {
sed -i 's/# '"$option"' is not set/'"$option"'=y/' $defconfigPath &>/dev/null || true;
#Some defconfigs are very minimal/not-autogenerated, so lets add the rest. Obviously most won't have any affect as they aren't supported.
if [[ "$defconfigPath" == *"lineage"* ]]; then
if ! grep -q "$option""=y" $defconfigPath; then
echo "$option""=y" | tee -a $defconfigPath > /dev/null;
if ! grep -q "$option=y" $defconfigPath; then
echo "$option=y" | tee -a $defconfigPath > /dev/null;
fi;
fi;
done
@ -314,8 +314,8 @@ hardenDefconfig() {
sed -i 's/'"$option"'=y/# '"$option"' is not set/' $defconfigPath &>/dev/null || true;
#Some defconfigs are very minimal/not-autogenerated, so lets add the rest. Obviously most won't have any affect as they aren't supported.
if [[ "$defconfigPath" == *"lineage"* ]]; then
if ! grep -q "$option""=n" $defconfigPath; then
echo "$option""=n" | tee -a $defconfigPath > /dev/null;
if ! grep -q "$option=n" $defconfigPath; then
echo "$option=n" | tee -a $defconfigPath > /dev/null;
fi;
fi;
done