Disk labels in mount2dir

Devlin devlin at softhome.net
Tue Jul 9 01:09:09 CEST 2002


The following patch lets mount2dir understand labeled partitions in 
fstab.

This alone doesn't let install LABELed partitions with fai.  Normally, 
fai doesn't put LABEL= lines in fstab.  You can set up labelled 
partitions, by using a hook and a patched setup_harddisks, or by 
entirely overriding the partition task.

--- mount2dir.orig Mon Jul  8 18:13:37 2002
+++ mount2dir   Fri Jul  5 18:34:48 2002
@@ -67,7 +67,7 @@
      case $device in
         ""|\#*) continue ;;

-       /dev/*)
+       /dev/*|LABEL=*)

             # overwrite mount options
             mopt="-o $mopt"
@@ -76,6 +76,9 @@
             [ $verbose ] && echo "mounting $device to $target$mountpoint 
type: $fstype opt: $mopt"
             # should we fsck the partition first ?
             [ "$fscheck" = 1 ] && fsck -nt $fstype $device
+           case $device in
+               LABEL=*) device="-L `echo $device | sed 's/^LABEL=//'`"
+           esac
             mount -t $fstype $mopt $device $target$mountpoint
      esac
  done



More information about the linux-fai mailing list