tags 463258 patch user [EMAIL PROTECTED] usertags ubuntu-patch hardy thanks
On Wed, Jan 30, 2008 at 05:59:45PM +0100, Michal Suchanek wrote: > The mount command included in initrd.img does not support -i nor -f > options. > > When mounting a fuse filesystem libfuse execs mount with both of these > options (probably to record the mount point in /etc/mtab). I edited the > lib/fuse_mnt_utils.c to not do the call, and now mounting fuse > filesystem works even in initrd. > > However, I did not find an option in fuse that would disable the mount > call, and without building a custom libfuse package or including a > custom mount command in the ramdisk mounting fuse filesystems is not > possible. Here's the patch we included in Ubuntu for the exact same reason. The only support that's needed to make it work is pretty trivial. Thanks, -- Colin Watson [EMAIL PROTECTED]
diff -Nur klibc-1.5/usr/utils/mount_main.c klibc-1.5.new/usr/utils/mount_main.c --- klibc-1.5/usr/utils/mount_main.c 2007-03-04 01:52:10.000000000 +0000 +++ klibc-1.5.new/usr/utils/mount_main.c 2007-09-11 18:37:16.000000000 +0100 @@ -64,7 +64,7 @@ rwflag = MS_VERBOSE; do { - c = getopt(argc, argv, "no:rt:w"); + c = getopt(argc, argv, "no:rt:wfi"); if (c == EOF) break; switch (c) { @@ -83,6 +83,12 @@ case 'w': rwflag &= ~MS_RDONLY; break; + case 'f': + /* we can't edit /etc/mtab yet anyway; exit */ + exit(0); + case 'i': + /* ignore for now; no support for mount helpers */ + break; case '?': fprintf(stderr, "%s: invalid option -%c\n", progname, optopt); @@ -98,7 +104,7 @@ type = "none"; if (optind + 2 != argc || type == NULL) { - fprintf(stderr, "Usage: %s [-r] [-w] [-o options] [-t type] " + fprintf(stderr, "Usage: %s [-r] [-w] [-o options] [-t type] [-f] [-i] " "[-n] device directory\n", progname); exit(1); } diff -Nur klibc-1.5/usr/utils/umount.c klibc-1.5.new/usr/utils/umount.c --- klibc-1.5/usr/utils/umount.c 2007-03-04 01:52:10.000000000 +0000 +++ klibc-1.5.new/usr/utils/umount.c 2007-09-11 18:36:49.000000000 +0100 @@ -17,7 +17,7 @@ progname = argv[0]; do { - c = getopt(argc, argv, "fl"); + c = getopt(argc, argv, "fli"); if (c == EOF) break; switch (c) { @@ -27,6 +27,9 @@ case 'l': flag |= MNT_DETACH; break; + case 'i': + /* ignore for now; no support for umount helpers */ + break; case '?': fprintf(stderr, "%s: invalid option -%c\n", progname, optopt); @@ -35,7 +38,8 @@ } while (1); if (optind + 1 != argc) { - fprintf(stderr, "Usage: %s [-f] [-l] mntpoint\n", progname); + fprintf(stderr, "Usage: %s [-f] [-l] [-i] mntpoint\n", + progname); return 1; }