Changeset 3cf24b4


Ignore:
Timestamp:
Oct 13, 2007, 4:43:49 PM (17 years ago)
Author:
Joe Ciccone <jciccone@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
6718578
Parents:
73bc173
Message:

Install static nodes for udev with the udev bootscript.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/Makefile

    r73bc173 r3cf24b4  
    11ETCDIR=/etc
     2LIBDIR=/lib
    23EXTDIR=${DESTDIR}${ETCDIR}
    34MODE=754
     
    2223        install -d -m ${DIRMODE} ${EXTDIR}/sysconfig/network-devices/services
    2324
    24 install: create-dirs create-service-dir
     25udev_device_dirs:
     26        install -d -m ${DIRMODE} ${DESTDIR}${LIBDIR}/udev/devices
     27        install -d -m ${DIRMODE} ${DESTDIR}${LIBDIR}/udev/devices/pts
     28        install -d -m ${DIRMODE} ${DESTDIR}${LIBDIR}/udev/devices/shm
     29        install -d -m ${DIRMODE} ${DESTDIR}${LIBDIR}/udev/devices/net
     30
     31udev_device_links: udev_device_dirs
     32        ln -snf /proc/self/fd ${DESTDIR}${LIBDIR}/udev/devices/fd
     33        ln -snf /proc/self/fd/0 ${DESTDIR}${LIBDIR}/udev/devices/stdin
     34        ln -snf /proc/self/fd/1 ${DESTDIR}${LIBDIR}/udev/devices/stdout
     35        ln -snf /proc/self/fd/2 ${DESTDIR}${LIBDIR}/udev/devices/stderr
     36        ln -snf /proc/kcore ${DESTDIR}${LIBDIR}/udev/devices/core
     37
     38mknod_devices: udev_device_dirs
     39        @if [ "$$UID" = "0" ]; then \
     40                if ! [ -e ${DESTDIR}${LIBDIR}/udev/devices/null ]; then \
     41                        mknod -m 0666 ${DESTDIR}${LIBDIR}/udev/devices/null c 1 3 ;\
     42                fi \
     43        fi
     44        @if [ "$$UID" = "0" ]; then \
     45                if ! [ -e ${DESTDIR}${LIBDIR}/udev/devices/console ]; then \
     46                        mknod -m 0600 ${DESTDIR}${LIBDIR}/udev/devices/console c 5 1 ;\
     47                fi \
     48        fi
     49        @if [ "$$UID" != "0" ]; then \
     50                if ! [ -e ${DESTDIR}${LIBDIR}/udev/devices/null ]; then \
     51                        echo "You will need to issue the following command as the root user" ;\
     52                        echo "" ;\
     53                        echo "mknod -m 0666 ${DESTDIR}${LIBDIR}/udev/devices/null c 1 3" ;\
     54                fi \
     55        fi
     56        @if [ "$$UID" != "0" ]; then \
     57                if ! [ -e ${DESTDIR}${LIBDIR}/udev/devices/console ]; then \
     58                        echo "mknod -m 0600 ${DESTDIR}${LIBDIR}/udev/devices/console c 5 1" ;\
     59                        echo "" ;\
     60                fi \
     61        fi
     62
     63install: create-dirs create-service-dir udev_device_dirs udev_device_links
    2564        install -m ${MODE} clfs/init.d/checkfs       ${EXTDIR}/rc.d/init.d/
    2665        install -m ${MODE} clfs/init.d/cleanfs       ${EXTDIR}/rc.d/init.d/
     
    86125        install                   -m ${MODE} clfs/sysconfig/network-devices/services/ipv4-static       ${EXTDIR}/sysconfig/network-devices/services/
    87126        install                   -m ${MODE} clfs/sysconfig/network-devices/services/ipv4-static-route ${EXTDIR}/sysconfig/network-devices/services/
     127        @$(MAKE) mknod_devices
    88128
    89129install-consolelog: create-dirs
     
    95135        install -m ${MODE} contrib/sysconfig/network-devices/services/mtu ${EXTDIR}/sysconfig/network-devices/services
    96136
    97 minimal: create-dirs create-service-dir
     137minimal: create-dirs create-service-dir udev_device_dirs udev_device_links
    98138        sed -e 's|/bin:/usr/bin:/sbin:/usr/sbin|/tools/bin:/tools/sbin:/bin:/sbin|g' clfs/init.d/functions > clfs/init.d/functions.minimal
    99139        install -m ${MODE} clfs/init.d/checkfs                  ${EXTDIR}/rc.d/init.d/
     
    126166        if [ ! -f ${EXTDIR}/sysconfig/rc          ]; then install -m ${CONFMODE} clfs/sysconfig/rc          ${EXTDIR}/sysconfig/; fi
    127167        if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then install -m ${CONFMODE} clfs/sysconfig/createfiles ${EXTDIR}/sysconfig/; fi
     168        @$(MAKE) mknod_devices
    128169
    129170install-raq2:
Note: See TracChangeset for help on using the changeset viewer.