if [ -f "$device_map.old" ]; then
mv -f "$device_map.old" "$device_map"
fi
-else
+
+:q!else
rm -f "$device_map.old"
fi
echo -n " grub4"
fi
# try to fix device map with symlink resolved device
if [ "x$install_device_resolved" != "x$install_device" ]; then
- cp_check_and_sed '^(hd0)' \
- "s;^(hd0).*;(hd0) $install_device_resolved" "$device_map" \
+ cp_check_and_sed '^\(hd0\)' \
+ "s;^(hd0).*;(hd0) $install_device_resolved;" "$device_map" \
|| true
fi
fi