Re: udev: Directory for custom device nodes.

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

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux