projects
/
kernel-cn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7399415
)
- jos poboljsanja za grub2 detekciju i regeneriranje confa u slucaju
author
Dinko Korunic
<kreator@carnet.hr>
Thu, 28 Apr 2011 13:40:47 +0000
(15:40 +0200)
committer
Dinko Korunic
<kreator@carnet.hr>
Thu, 28 Apr 2011 13:40:47 +0000
(15:40 +0200)
ptorebe
debian/postinst
patch
|
blob
|
history
diff --git
a/debian/postinst
b/debian/postinst
index
6dfe2d6
..
146bc1e
100755
(executable)
--- a/
debian/postinst
+++ b/
debian/postinst
@@
-89,7
+89,7
@@
echo "."
# detect existing Grub2 installation
GRUB2="no"
# detect existing Grub2 installation
GRUB2="no"
-if [ -e /boot/grub/grub.cfg ]; then
+if [ \( -e /boot/grub/grub.cfg \) -o \( -e /boot/grub/core.img \) ]; then
echo "CN: Detected GRUB2 installation, will try to use it."
GRUB2="yes"
if [ -e /boot/grub/menu.lst ]; then
echo "CN: Detected GRUB2 installation, will try to use it."
GRUB2="yes"
if [ -e /boot/grub/menu.lst ]; then
@@
-178,6
+178,7
@@
if [ "x$GRUB2" = "xno" ]; then
fi
else
# Grub2 part
fi
else
# Grub2 part
+ touch /boot/grub/grub.cfg
update-grub >/dev/null 2>&1 || true
fi
echo -n " grub2"
update-grub >/dev/null 2>&1 || true
fi
echo -n " grub2"
@@
-232,7
+233,8
@@
EOF
fi
else
# Grub2 part
fi
else
# Grub2 part
- grub-mkdevicemap -n
+ grub-mkdevicemap --no-floppy
+ grub-install --no-floppy --grub-setup=/bin/true "$(grub-probe /boot/grub)" >/dev/null 2>&1
fi
echo -n " grub3"
fi
echo -n " grub3"
@@
-267,7
+269,7
@@
if [ "x$GRUB2" = "xno" ]; then
fi
else
# Grub2 part
fi
else
# Grub2 part
- install_device='(hd0)'
+ install_device="$(grub-probe /boot/grub)"
fi
echo -n " grub4"
fi
echo -n " grub4"