#1963: Textual issues in chapter07/symlinks.xml
--------------------------------------------+-------------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  [email protected]
     Type:  task                            |       Status:  new                
          
 Priority:  normal                          |    Milestone:                     
          
Component:  Book                            |      Version:  SVN                
          
 Severity:  normal                          |   Resolution:                     
          
 Keywords:                                  |  
--------------------------------------------+-------------------------------
Comment (by Bryan Kadzban):

 What about a loop to run write_cd_rules for each of the block devices on
 the system that all of {{{cdrom_id}}}, {{{path_id}}}, and either
 {{{ata_id}}} or {{{scsi_id}}} print values for?  It'd be ugly-looking, but
 it'd be the equivalent of the {{{write_net_rules all_interfaces}}} command
 that gets run in section 7.13.1 for network cards.

 That way, the user pre-generates their rules, so they have something to
 look at, but those rules don't actually run until the new system boots.
 But the write_cd_rules script also prints out any symlinks that it creates
 rules for, so the user can tell which symlinks get generated for each
 block device (with the appropriate echoing inside the loop for each block
 device).  Here's what I'm thinking for the loop:

 {{{
 for dev in /sys/block/* ; do
     export DEVPATH=${dev##/sys}
     BLKDEV=/dev/${DEVPATH##/block/}
     echo "Inspecting $BLKDEV:"

     CDVARS=`/lib/udev/cdrom_id --export $BLKDEV`
     [ -z "$CDVARS" ] && continue

     PATHVARS=`/lib/udev/path_id`
     [ -z "$PATHVARS" ] && continue

     ATAVARS=`/lib/udev/ata_id --export $BLKDEV || \
         /lib/udev/scsi_id --export $BLKDEV`
     [ -z "$ATAVARS" ] && continue

     eval $CDVARS $PATHVARS $ATAVARS /lib/udev/write_cd_rules $MODE
 done
 }}}

 {{{$MODE}}} will be set based on the method the user wants to use (when
 modifying the udev rules files).

 Or maybe I should try to get something like that merged in upstream (at
 least the minimum all_interfaces equivalent, which wouldn't print
 anything)?  Though that would still require this loop (or something like
 it) until the next Udev is released, if it's accepted.

 Or were you thinking much simpler, like a note saying "inspect the
 symlinks created on your first boot, since they may be different from your
 host's CD device symlinks"?  I suppose that would work too.

-- 
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/1963#comment:3>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to