Skip to content

Commit

Permalink
mxgrub: Deduplicate kernel parameter list
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Aug 2, 2019
1 parent 17202cf commit cc211e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mxgrub/mxgrub
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ sub scan_mariux {
}
}

our $KERNEL_PARAMETER="ro crashkernel=256M console=ttyS0,115200n8 console=ttyS1,115200n8 console=tty0 init=/bin/systemd audit=0";

sub update_grub_cfg {
my $kernellist='';

Expand All @@ -263,10 +265,10 @@ insmod all_video
if [ -e /etc/local/USB.usb ]; then
set default="mariuxUSB"
menuentry "mariuxUSB" --unrestricted { save_env chosen ; linux /boot/bzImage.x86_64 crashkernel=256M root=LABEL=rootusb ro init=/bin/systemd audit=0 ; initrd /boot/grub/initramfs.igz }
menuentry "mariuxUSB" --unrestricted { save_env chosen ; linux /boot/bzImage.x86_64 root=LABEL=rootusb $KERNEL_PARAMETER ; initrd /boot/grub/initramfs.igz }
else
menuentry "$MARIUX_DEFAULT" --unrestricted { set chosen="$submenu>$MARIUX_DEFAULT" ; save_env chosen ; linux /boot/bzImage.x86_64 crashkernel=256M root=LABEL=root ro console=ttyS0,115200n8 console=ttyS1,115200n8 console=tty0 init=/bin/systemd audit=0 ; initrd /boot/grub/initramfs.igz }
menuentry "$MARIUX_DEFAULT" --unrestricted { set chosen="$submenu>$MARIUX_DEFAULT" ; save_env chosen ; linux /boot/bzImage.x86_64 root=LABEL=root $KERNEL_PARAMETER ; initrd /boot/grub/initramfs.igz }
submenu "$submenu" --unrestricted {
$kernellist
Expand Down

0 comments on commit cc211e0

Please sign in to comment.