# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../udev/udev.conf # Copyright (C) 2007 - 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 --- 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_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() { local rulesd=$root$sysconfdir/udev/rules.d echo "Installing our .rules files..." for x in $confdir/rules/*.rules; do [ ! -e "etc/udev/rules.d/${x##*/}" ] || echo_warning "${x##*/}: conflict detected." install -v -m 644 $x $rulesd/ done } hook_add postmake 5 'udev_devices' hook_add postmake 6 'udev_rules' var_append makeopt ' ' "LD=$CC" var_append makeopt ' ' 'DEBUG=true' # FIXME: For now we have to build it static by default because of our initrd! #if [ "$SDECFG_STATIC" == "1" ]; then var_append makeopt ' ' "VOLUME_ID_STATIC=true" var_append patchfiles ' ' "$confdir/no_libvolume_id_so.diff" #fi # list of extra helpers to build and install hook_add postpatch 5 "export extras=\$( ls -1d extras/* | grep -v '\.sh' | tr '\n' ' ' )" var_append makeopt ' ' 'EXTRAS="$extras"' var_append makeinstopt ' ' 'EXTRAS="$extras"'