[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#234136: autopartkit: Using /media/cdrom instead of /cdrom



Package: autopartkit
Version: 0.79

I have been asked to add /media in base-files to follow the FHS standard,
which I have just done, but of course adding /media will not make our
system more FHS compliant unless we actually use /media/cdrom instead
of /cdrom and such.

I believe this patch is the only thing required for /media/cdrom to be
used by the install program, since APT relies on the information
written in /etc/fstab.

Please drop me a note whenever this patch or something similar is
applied (or simply reassign this bug back to the base-files package)
so that I can safely stop creating /floppy and /cdrom in base-files.

(I suspect that I could already do this, if, as it seems, this code
runs even before base-files and the other base packages are unpacked).

Thanks.

Patch follows:

diff -ru autopartkit-0.78.orig/autopartkit.c autopartkit-0.78/autopartkit.c
--- autopartkit-0.78.orig/autopartkit.c	Thu Dec 18 17:21:20 2003
+++ autopartkit-0.78/autopartkit.c	Sun Feb 22 00:16:53 2004
@@ -791,11 +791,14 @@
 #endif /* CREATE_FSTAB */

     /* Are these really needed?  Who will create them if they are missing? */
-    if (0 != mkdir("/target/floppy", 0755))
-        autopartkit_error(1, "Unable to mkdir /target/floppy: %s",
+    if (0 != mkdir("/target/media", 0755))
+        autopartkit_error(1, "Unable to mkdir /target/media: %s",
 			  strerror(errno));
-    if (0 != mkdir("/target/cdrom", 0755))
-        autopartkit_error(1, "Unable to mkdir /target/cdrom: %s",
+    if (0 != mkdir("/target/media/floppy", 0755))
+        autopartkit_error(1, "Unable to mkdir /target/media/floppy: %s",
+			  strerror(errno));
+    if (0 != mkdir("/target/media/cdrom", 0755))
+        autopartkit_error(1, "Unable to mkdir /target/media/cdrom: %s",
 			  strerror(errno));
 #if defined(CREATE_FSTAB)
     fstab = fopen(FSTAB, "w");
@@ -867,8 +870,8 @@
 #if defined(CREATE_FSTAB)
     fprintf(fstab, "%s\tnone\tswap\tsw\t\t0\t0\n",
 	    normalize_devfs(find_partition_by_mountpoint(mountmap,"swap")));
-    fprintf(fstab, "/dev/fd0\t/floppy\tauto\trw,user,noauto\t\t0\t0\n");
-    fprintf(fstab, "/dev/cdrom\t/cdrom\tiso9660\tro,user,noauto\t\t0\t0\n");
+    fprintf(fstab, "/dev/fd0\t/media/floppy\tauto\trw,user,noauto\t\t0\t0\n");
+    fprintf(fstab, "/dev/cdrom\t/media/cdrom\tiso9660\tro,user,noauto\t\t0\t0\n");
     fprintf(fstab, "proc\t/proc\tproc\tdefaults\t\t0\t0\n");

     fclose(fstab);



Reply to: