X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Ffiles%2Fusr%2Fbin%2Fmyncq%2Fkd;h=2d65edb31ea696154b24b2de52350ff980999500;hp=e2b6494a4b7b8a5bc5219bc0540e2ffc6ccfe9ec;hb=6315fdaa029f0f107d98fde18ab584f958e06108;hpb=739efea3642e2f8a7a672c4600da152a27bedf1a diff --git a/fai/config/files/usr/bin/myncq/kd b/fai/config/files/usr/bin/myncq/kd index e2b6494..2d65edb 100755 --- a/fai/config/files/usr/bin/myncq/kd +++ b/fai/config/files/usr/bin/myncq/kd @@ -45,7 +45,7 @@ ata=${ata%%/*} arg=libata.force=${ata}.00:noncq if ! grep "^GRUB_CMDLINE_LINUX_DEFAULT=.*[\" ]${arg//./\\.}[\" ]" /etc/default/grub; then - sed -ri "s/^GRUB_CMDLINE_LINUX_DEFAULT=\"(.*)/GRUB_CMDLINE_LINUX_DEFAULT=\"$arg \1/" /etc/default/grub + sed -ri "s/([\" ])libata.force=[^ ]+ */\1/g;s/^GRUB_CMDLINE_LINUX_DEFAULT=\"(.*)/GRUB_CMDLINE_LINUX_DEFAULT=\"$arg \1/" /etc/default/grub if $upgrub; then echo "$0: warning: grub updated. you may want to reboot" if type -P update-grub2 &>/dev/null; then