Exclude systemd.machineid from /etc/kernel/cmdline
This commit is contained in:
parent
0581b07aaa
commit
d6bba71c54
|
@ -34,9 +34,11 @@ if [[ ! -e /etc/kernel/cmdline ]]; then
|
|||
|
||||
BOOT_OPTIONS=""
|
||||
read -r -d '' -a line < /proc/cmdline
|
||||
# Add the items from /proc/cmdline excluding the items we don't need
|
||||
for i in "${line[@]}"; do
|
||||
[[ "${i#initrd=*}" != "$i" ]] && continue
|
||||
[[ "${i#BOOT_IMAGE=*}" != "$i" ]] && continue
|
||||
[[ "${i#systemd.machine_id=*}" != "$i" ]] && continue
|
||||
BOOT_OPTIONS+="$i "
|
||||
done
|
||||
echo ${BOOT_OPTIONS} > /etc/kernel/cmdline
|
||||
|
|
Loading…
Reference in New Issue