From dcdce63992b88bc01442da1d97f423f85aaf08af Mon Sep 17 00:00:00 2001 From: Nagy Karoly Gabriel Date: Wed, 21 May 2008 17:13:49 +0300 Subject: [PATCH] [udev] added udev_device_nodes.txt and improved udev.conf to use it in conjunction with create_nodes.sh --- filesystem/udev/udev.conf | 35 ++------------------------- filesystem/udev/udev_device_nodes.txt | 25 +++++++++++++++++++ 2 files changed, 27 insertions(+), 33 deletions(-) create mode 100644 filesystem/udev/udev_device_nodes.txt diff --git a/filesystem/udev/udev.conf b/filesystem/udev/udev.conf index 7eb4022ba..58b02de94 100644 --- a/filesystem/udev/udev.conf +++ b/filesystem/udev/udev.conf @@ -21,39 +21,8 @@ udev_devices() { local devdir="$root/lib/udev/devices" echo "Creating base nodes ..." - mkdir -p "$devdir"/{pts,shm,net} - chmod 1777 "$devdir/shm" - - 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" + mkdir -p "$devdir" + $confdir/create_nodes.sh $devdir < $confdir/udev_device_nodes.txt } udev_rules() { diff --git a/filesystem/udev/udev_device_nodes.txt b/filesystem/udev/udev_device_nodes.txt new file mode 100644 index 000000000..1a5388e17 --- /dev/null +++ b/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