On Thu, 2005-01-13 at 11:57 +0100, Harald Hoyer wrote: > Bill Nottingham wrote: > > Harald Hoyer (harald@xxxxxxxxxx) said: > > > >>Due to > >>https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=144593 > >>I am thinking of another directory to put device nodes in, which should > >>be copied over to /dev on system start. > >> > >>Any suggestions? > > > > > > I'd think that a series of makedev invocations to run would be > > safer. > > > > Bill > > > > so how can we make this rpm friendly? > /etc/sysconfig/makedev.d/ > system.nodes > custom1.nodes > custom2.nodes > > cat /etc/sysconfig/makedev.d/*.nodes | xargs MAKEDEV -x > > doh, xargs is in /usr/bin ! :-/ how about this "xargs for the poor" (could be changed a bit and put into /etc/init.d/functions): --- 8< --- FILES=/etc/sysconfig/makedev.d/*.nodes MAXNR=100 COMMAND="MAKEDEV -x" NR=$MAXNR ARGS="" cat $FILES | while read line; do if [ "$NR" -gt 0 ]; then ARGS="$ARGS $line" NR=$[$NR - 1] else $COMMAND $ARGS NR=$MAXNR ARGS="$line" fi done if [ -n "$ARGS" ]; then $COMMAND $ARGS fi --- >8 --- Nils -- Nils Philippsen / Red Hat / nphilipp@xxxxxxxxxx "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- B. Franklin, 1759 PGP fingerprint: C4A8 9474 5C4C ADE3 2B8F 656D 47D8 9B65 6951 3011