#!/bin/sh # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. source ../sysinfos 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 && ldconfig # Return last error exit $?