blob: 3f6341b4e45638c6c54ef20780bfa42b4acaf0ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
2005-08-23 Thomas Schwinge <tschwinge@gnu.org>
* grub-install (find_device): Rough port for GNU/Hurd.
--- grub-install.orig 2005-08-23 16:56:02.000000000 +0200
+++ grub-install 2005-08-23 17:01:55.000000000 +0200
@@ -263,7 +263,14 @@
find_device () {
# For now, this uses the program `df' to get the device name, but is
# this really portable?
- tmp_fname=`df $1/ | sed -n 's%.*\(/dev/[^ ]*\).*%\1%p'`
+ # No. (Not even on GNU/Linux.) - Thomas Schwinge
+
+ case $host_os in
+ gnu*) # TODO: What about using multiple devices?
+ tmp_fname=`fsysopts $1/ | sed -n 's%.*device:\([^ ]*\).*%/dev/\1%p'`;;
+ *)
+ tmp_fname=`df $1/ | sed -n 's%.*\(/dev/[^ ]*\).*%\1%p'`;;
+ esac
if test -z "$tmp_fname"; then
echo "Could not find device for $1" 2>&1
|