Bug#592684: debian-installer-utils: please don't check for /sys on Hurd
On Thu, Aug 12, 2010 at 11:49:22AM +0200, Jeremie Koenig wrote:
> On Thu, Aug 12, 2010 at 09:43:06AM +0200, Petter Reinholdtsen wrote:
> > [Jeremie Koenig]
> > > - if [ ! -d /target/sys ]; then
> > > + if [ ! -d /target/sys ] && [ "$(udpkg --print-os)" != hurd ]; then
> >
> > Would it be better to look for 'sysfs' in /proc/filesystems to avoid
> > hardcoding OS names there?
>
> Unfortunately, neither Hurd nor kFreeBSD have a /proc/filesystems file.
> Also, the /sys filesystem is named "linsysfs" on kFreeBSD.
>
> An alternative would be to check for, say, /sys/devices in the installer
> itself. Does this sound reasonable?
I have used the attached patch successfully for some time.
--
Jeremie Koenig <jk@jk.fr.eu.org>
http://jk.fr.eu.org
Index: debian-installer-utils/debian/changelog
===================================================================
--- debian-installer-utils/debian/changelog (revision 64475)
+++ debian-installer-utils/debian/changelog (working copy)
@@ -4,6 +4,10 @@
* Only detect /dev/cd0 as a CD-ROM drive on GNU/kFreeBSD, to prevent
multiple /etc/fstab entries.
+ [ Jeremie Koenig ]
+ * in-target: Check for /target/sys only if /sys/devices exists, to avoid
+ enforcing it on systems without a sysfs (ie. Hurd). Closes: #592684.
+
-- Aurelien Jarno <aurel32@debian.org> Sun, 22 Aug 2010 22:42:25 +0200
debian-installer-utils (1.78) unstable; urgency=low
Index: debian-installer-utils/chroot-setup.sh
===================================================================
--- debian-installer-utils/chroot-setup.sh (revision 64475)
+++ debian-installer-utils/chroot-setup.sh (working copy)
@@ -10,7 +10,7 @@
[ ! -d /target/proc ]; then
return 1
fi
- if [ ! -d /target/sys ]; then
+ if [ -d /sys/devices ] && [ ! -d /target/sys ]; then
return 1
fi
Reply to: