forked from ComplianceAsCode/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ComplianceAsCode#11612 from mpurg/fix_grub_distrib…
…uted_config Fix grub2_bootloader_argument to check /etc/default/grub.d on Ubuntu
- Loading branch information
Showing
5 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
shared/templates/grub2_bootloader_argument/tests/arg_not_there_etcdefaultgrub.fail.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
shared/templates/grub2_bootloader_argument/tests/correct_value.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
shared/templates/grub2_bootloader_argument/tests/correct_value_configdir.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# platform = multi_platform_ubuntu | ||
# packages = grub2 | ||
|
||
{{%- if ARG_VARIABLE %}} | ||
# variables = {{{ ARG_VARIABLE }}}=correct_value | ||
{{%- set ARG_NAME_VALUE= ARG_NAME ~ "=correct_value" %}} | ||
{{%- endif %}} | ||
|
||
source common.sh | ||
|
||
echo > /etc/default/grub | ||
rm -f /etc/default/grub.d/* | ||
|
||
echo "GRUB_CMDLINE_LINUX=\"\$GRUB_CMDLINE_LINUX {{{ ARG_NAME_VALUE }}}\"" > /etc/default/grub.d/custom.cfg | ||
|
||
{{{ grub_command("update") }}} | ||
|