Skip to content

Commit

Permalink
format codes
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbtek committed Dec 2, 2019
1 parent a651961 commit f15adbe
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cookbooks/docker/recipes/install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@ function install()
local -r grubConfigFile='/etc/default/grub'
local -r grubConfigAttribute='GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"'

createFileFromTemplate "${grubConfigFile}" "${grubConfigFile}" 'GRUB_CMDLINE_LINUX=""' "${grubConfigAttribute}"
appendToFileIfNotFound "${grubConfigFile}" "$(stringToSearchPattern "${grubConfigAttribute}")" "${grubConfigAttribute}" 'true' 'false' 'true'
createFileFromTemplate \
"${grubConfigFile}" \
"${grubConfigFile}" \
'GRUB_CMDLINE_LINUX=""' "${grubConfigAttribute}"

appendToFileIfNotFound \
"${grubConfigFile}" \
"$(stringToSearchPattern "${grubConfigAttribute}")" \
"${grubConfigAttribute}" \
'true' \
'false' \
'true'

update-grub

Expand Down

0 comments on commit f15adbe

Please sign in to comment.