|
|
@ -0,0 +1,73 @@ |
|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# Filename: package/.../udev/udev.conf |
|
|
|
# Copyright (C) 2007 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 --- |
|
|
|
|
|
|
|
|
|
|
|
if [ "$prefix_auto" = 1 ] ; then |
|
|
|
prefix="" |
|
|
|
set_confopt |
|
|
|
fi |
|
|
|
|
|
|
|
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_mknod -m 0666 "$devdir/null" c 1 3 |
|
|
|
forced_mknod -m 0600 "$devdir/console" c 5 1 |
|
|
|
} |
|
|
|
|
|
|
|
udev_rules() { |
|
|
|
local rulesd=$root$sysconfdir/udev/rules.d |
|
|
|
|
|
|
|
echo "Installing .rules files..." |
|
|
|
|
|
|
|
mkdir -p "$rulesd" |
|
|
|
for x in $( ls -1 etc/udev/rules.d/*.rules $confdir/rules/*.rules 2> /dev/null ); do |
|
|
|
install -v -m 644 $x $rulesd/ |
|
|
|
done |
|
|
|
} |
|
|
|
|
|
|
|
udev_helpers() { |
|
|
|
local udevlib="$root/lib/udev" |
|
|
|
|
|
|
|
echo "Installing helpers ..." |
|
|
|
mkdir -p "$udevlib" |
|
|
|
|
|
|
|
for x in $( ls -1 $confdir/scripts/* extra/*.sh 2> /dev/null ); do |
|
|
|
install -v -m 755 "$x" $udevlib/ |
|
|
|
done |
|
|
|
} |
|
|
|
|
|
|
|
hook_add postmake 5 'udev_devices' |
|
|
|
hook_add postmake 6 'udev_rules' |
|
|
|
hook_add postmake 7 'udev_helpers' |