]> git.proxmox.com Git - mirror_zfs-debian.git/commitdiff
Link /proc/mounts to /etc/mtab.
authorDarik Horn <dajhorn@vanadac.com>
Wed, 30 Mar 2011 20:37:08 +0000 (15:37 -0500)
committerDarik Horn <dajhorn@vanadac.com>
Wed, 30 Mar 2011 20:37:08 +0000 (15:37 -0500)
During system start, the /etc/init/mountall.conf on Ubuntu is unable to
generate the /etc/mtab file from the /proc/mounts file if a ZFS filesystem is
already mounted.

However, mountall 2.18 behaves properly if /etc/mtab is a symlink to
/proc/mounts.  This version was first published in Ubuntu Maverick.

Additionally, the mountall package is peculiar to Ubuntu, so the mountall
dependency breaks Debian compatibility.  A better solution would be to update
mountall to recognize ZFS mounts, or to find a proc syntax that mountall
already recognizes.

debian/control
debian/zfs-initramfs.preinst [new file with mode: 0644]

index c562044c4b249c6cb6ab2e4a995d47494d08605c..c9b9ab125d7fa9850cb1c37e34d4f2894d1abefd 100644 (file)
@@ -77,7 +77,7 @@ Description: Native ZFS filesystem kernel modules for Linux
 
 Package: zfs-initramfs
 Architecture: linux-any
-Depends: ${misc:Depends}, gawk, zfsutils
+Depends: ${misc:Depends}, mountall (>= 2.18), gawk, zfsutils
 Description: Native ZFS root filesystem capabilities for Linux
 
 Package: zfsutils
diff --git a/debian/zfs-initramfs.preinst b/debian/zfs-initramfs.preinst
new file mode 100644 (file)
index 0000000..b8eb5ec
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# @FIXME: During system start, the /etc/init/mountall.conf on Ubuntu is unable
+# to generate the /etc/mtab file from the /proc/mounts file if a ZFS filesystem
+# is already mounted.
+
+# This depends on mountall 2.18, which recognizes the link.
+ln -sf /proc/mounts /etc/mtab