# Start preseed_late_default
# This script runs in the chroot /target by default
$SNIPPET('post_install_network_config_deb')
+# set kernel options as defined by the system, profile or distro
+# in the Kernel Options (Post Install) field which populates the var kernel_options_post
+$SNIPPET('cephlab_post_install_kernel_options')
$SNIPPET('late_apt_repo_config')
$SNIPPET('post_run_deb')
$SNIPPET('download_config_files')
--- /dev/null
+## {{ ansible_managed }}
+#if $getVar('kernel_options_post','') != ''
+# Start post install kernel options update
+if [ -f /etc/default/grub ]; then
+ # set GRUB_CMDLINE_LINUX
+ TMP_GRUB=\$(gawk 'match(\$0,/^GRUB_CMDLINE_LINUX="([^"]+)"/,a) {printf("%s\n",a[1])}' /etc/default/grub)
+ sed -i '/^GRUB_CMDLINE_LINUX=/d' /etc/default/grub
+ echo "GRUB_CMDLINE_LINUX=\"\$TMP_GRUB $kernel_options_post\"" >> /etc/default/grub
+ grub-mkconfig -o /boot/grub/grub.cfg
+fi
+# End post install kernel options update
+#end if