Browse Source

[udev] added udev_device_nodes.txt and improved udev.conf to use it in conjunction with create_nodes.sh

early
Nagy Karoly Gabriel 17 years ago
parent
commit
dcdce63992
  1. 35
      filesystem/udev/udev.conf
  2. 25
      filesystem/udev/udev_device_nodes.txt

35
filesystem/udev/udev.conf

@ -21,39 +21,8 @@ udev_devices() {
local devdir="$root/lib/udev/devices" local devdir="$root/lib/udev/devices"
echo "Creating base nodes ..." echo "Creating base nodes ..."
mkdir -p "$devdir"/{pts,shm,net} mkdir -p "$devdir"
chmod 1777 "$devdir/shm" $confdir/create_nodes.sh $devdir < $confdir/udev_device_nodes.txt
ln -snf /proc/self/fd "$devdir/fd"
ln -snf /proc/self/fd/0 "$devdir/stdin"
ln -snf /proc/self/fd/1 "$devdir/stdout"
ln -snf /proc/self/fd/2 "$devdir/stderr"
ln -snf /proc/kcore "$devdir/core"
forced_mknod() {
local mode=
case "$1" in
-m) mode="$2"; shift; shift ;;
--mode=*) mode=${1#*=}; shift ;;
esac
rm -f "$1"
mknod ${mode:+--mode=$mode} "$@"
add_flist "$1"
}
forced_mkfifo() {
local mode=
case "$1" in
-m) mode="$2"; shift; shift ;;
esac
rm -f "$1"
mkfifo ${mode:+-m $mode} "$@"
add_flist "$1"
}
forced_mknod -m 0666 "$devdir/null" c 1 3
forced_mknod -m 0600 "$devdir/console" c 5 1
forced_mkfifo -m 0666 "$devdir/log"
} }
udev_rules() { udev_rules() {

25
filesystem/udev/udev_device_nodes.txt

@ -0,0 +1,25 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../udev/udev_device_nodes.txt
# Copyright (C) 2008 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
c console 600 root root 5 1
l core 777 root root /proc/kcore
l fd 777 root root /proc/self/fd
s log 666 root root
d net 2755 root root
c null 666 root root 1 3
d pts 2755 root root
d shm 3777 root root
l stderr 777 root root /proc/self/fd/2
l stdin 777 root root /proc/self/fd/0
l stdout 777 root root /proc/self/fd/1
Loading…
Cancel
Save