blob: 2489fc13b6fa31c954388253a60e2eaa82a903dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
if [ -f /etc/grub/default ]; then
. /etc/grub/default
fi
if [ -z "$GRUB_CMDLINE_LINUX_DEFAULT" ]; then
set -- $(cat /proc/cmdline)
bootopts=
for opt; do
case "$opt" in
initrd=*|BOOT_IMAGE=*|root=*|rootflags=*) ;;
*) bootopts="$bootopts $opt";;
esac
done
mkdir -p /etc/default
echo "GRUB_CMDLINE_LINUX_DEFAULT=\"$bootopts\"" >> /etc/default/grub
fi
|