fixes and updates for t10
[automated-distro-installer] / fai / config / files / usr / bin / myncq / kd
index e2b6494a4b7b8a5bc5219bc0540e2ffc6ccfe9ec..2d65edb31ea696154b24b2de52350ff980999500 100755 (executable)
@@ -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