# detect existing Grub2 installation
GRUB2="no"
-if [ -e /boot/grub/grub.cfg ];
+if [ -e /boot/grub/grub.cfg ]; then
echo "CN: Detected GRUB2 installation, will try to use it."
GRUB2="yes"
if [ -e /boot/grub/menu.lst ]; then
fi
fi
if [ ! -e "$menu_file" ]; then
- yes | /usr/sbin/update-grub >/dev/null 2>&1 || true
+ yes | update-grub >/dev/null 2>&1 || true
else
- /usr/sbin/update-grub >/dev/null 2>&1 || true
+ update-grub >/dev/null 2>&1 || true
fi
else
# Grub2 part
- /usr/sbin/update-grub >/dev/null 2>&1 || true
+ update-grub >/dev/null 2>&1 || true
fi
echo -n " grub2"
"s;^# kopt=\(.*\)root=[^[:space:]]*\(.*\);# kopt=\1root=$root_device\2;g" \
"$menu_file" || true
fi
-/usr/sbin/update-grub >/dev/null 2>&1 || true
+update-grub >/dev/null 2>&1 || true
echo -n " grub6"
# fix possible wrong params in menu.lst