X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fcis-udev;h=d83d04cf525bdb10cae0e8900e4409fdc85c6d0a;hb=46c7c4e8f98985e982995b4e4f4967abbd72f9a3;hp=21048753ae3c407a94c3e75244883de9faf68e42;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage2/cis-udev b/stage2/cis-udev index 2104875..d83d04c 100755 --- a/stage2/cis-udev +++ b/stage2/cis-udev @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,56 +9,37 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && - -cd ${LFS_TMP}/${1} && - -install -dv /lib/{firmware,udev/devices/{pts,shm}} && - -if [ ! -c /lib/udev/devices/null ]; then - mknod -m0666 /lib/udev/devices/null c 1 3 || exit 1 -fi && - -if [ ! -h /lib/udev/devices/fd ]; then - ln -sfv /proc/self/fd /lib/udev/devices/fd || exit 1 -fi && - -if [ ! -h /lib/udev/devices/stdin ]; then - ln -sfv /proc/self/fd/0 /lib/udev/devices/stdin || exit 1 -fi && - -if [ ! -h /lib/udev/devices/stdout ]; then - ln -sfv /proc/self/fd/1 /lib/udev/devices/stdout || exit 1 -fi && - -if [ ! -h /lib/udev/devices/stderr ]; then - ln -sfv /proc/self/fd/2 /lib/udev/devices/stderr || exit 1 -fi && - -if [ ! -h /lib/udev/devices/core ]; then - ln -sfv /proc/kcore /lib/udev/devices/core || exit 1 -fi && - -make EXTRAS="`echo extras/*/`" && -make DESTDIR=/ EXTRAS="`echo extras/*/`" install && - -# First install the commonly-used rules files provided by Udev: -cp -v etc/udev/rules.d/[0-9]* /etc/udev/rules.d/ && - -# Install the documentation that explains how to create custom Udev rules: -#install -m644 -v docs/writing_udev_rules/index.html \ -# /usr/share/doc/${1}/index.html && - -cat > /etc/sysconfig/modules << "EOF" && -# Add modules that must be manually loaded in this file, -# one per line. - -EOF - -chmod -v 644 /etc/sysconfig/modules && - +apply_patches ${1} + +cd ${LFS_TMP}/${1} +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --sbindir=/sbin \ + --with-rootlibdir=/lib \ + --libexecdir=/lib/udev \ + --docdir=/usr/share/doc/${1} \ + --disable-extras \ + --disable-introspection +make +make install + +# Udev has to be configured in order to work properly, as its default +# configuration does not cover all devices. First install two extra +# rules files from Udev to help support device-mapper and RAID setups: +install -m644 -v rules/packages/64-*.rules \ + /lib/udev/rules.d/ + +# Now install a file to create symlinks for certain hand-held devices: +install -m644 -v rules/packages/40-pilot-links.rules \ + /lib/udev/rules.d/ + +# Now install a file to handle ISDN devices: +install -m644 -v rules/packages/40-isdn.rules \ + /lib/udev/rules.d/ + +install -m755 ${SCRDIR}/misc/udev-create-persistent-net.sh /usr/local/bin ldconfig -# Return last error exit $?