udev: Directory for custom device nodes.

Harald Hoyer harald at redhat.com
Thu Jan 13 15:27:59 UTC 2005


Nils Philippsen wrote:
> 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

what about this one? :)
for i in /etc/sysconfig/makedev.d/*.nodes; do
	MAKEDEV -x $(cat "$i")
done




More information about the fedora-devel-list mailing list