diff options
-rwxr-xr-x | smgl/init.d/BUILD | 2 | ||||
-rwxr-xr-x | smgl/init.d/CONFIGURE | 12 | ||||
-rwxr-xr-x | smgl/init.d/DEPENDS | 29 | ||||
-rwxr-xr-x | smgl/init.d/DETAILS | 2 | ||||
-rwxr-xr-x | smgl/init.d/FINAL | 7 | ||||
-rw-r--r-- | smgl/init.d/HISTORY | 10 | ||||
-rwxr-xr-x | smgl/init.d/init.d/devices | 96 | ||||
-rw-r--r-- | smgl/init.d/init.d/devices.conf | 4 |
8 files changed, 18 insertions, 144 deletions
diff --git a/smgl/init.d/BUILD b/smgl/init.d/BUILD index e979159b0c..2627d29ee7 100755 --- a/smgl/init.d/BUILD +++ b/smgl/init.d/BUILD @@ -31,6 +31,6 @@ check_static_dev () { rmdir /tmp/$$.bindmount } -if [[ "$DEVICES" != "devfs" ]] && [[ "$CREATE_DEV_TREE" == y ]]; then +if [[ "$CREATE_DEV_TREE" == y ]]; then check_static_dev fi diff --git a/smgl/init.d/CONFIGURE b/smgl/init.d/CONFIGURE index 59446b644b..7a4b3aee07 100755 --- a/smgl/init.d/CONFIGURE +++ b/smgl/init.d/CONFIGURE @@ -10,13 +10,6 @@ else DEVICES_LIST="static" fi && -if grep -q devfs /proc/filesystems && - [[ -e /dev/.devfsd ]]; then - DEVICES_LIST="$DEVICES_LIST devfs" && - message "\n${MESSAGE_COLOR}NOTICE: Switching from devfs to udev or static" \ - "currently needs manual editing of /etc/fstab.${DEFAULT_COLOR}\n" -fi && - # default to the previously selected option #9772 - only a problem on the very # second cast. Adding it to the start of the list makes it the default in # the next query. @@ -25,7 +18,4 @@ if [[ -f $INSTALL_ROOT/etc/sysconfig/devices ]]; then fi && config_query_list DEVICES "Choose /dev management mode:" \ $DEVICES ${DEVICES_LIST/$DEVICES/} && -if [[ "$DEVICES" != "devfs" ]] -then - config_query CREATE_DEV_TREE "check for/create static /dev tree" y -fi +config_query CREATE_DEV_TREE "check for/create static /dev tree" y diff --git a/smgl/init.d/DEPENDS b/smgl/init.d/DEPENDS index e529f4d614..712afdb063 100755 --- a/smgl/init.d/DEPENDS +++ b/smgl/init.d/DEPENDS @@ -1,29 +1,4 @@ -depends simpleinit-msb && - -if [[ $DEVICES == devfs ]] +if [[ $DEVICES == udev ]] then - optional_depends devfsd \ - "" \ - "" \ - "to make devfs more functional and compatible with \ -the old static /dev" -elif [[ $DEVICES == udev ]] -then - local KVER=$(get_kernel_version) && - local VER1=${KVER/.*} && - local VER2=$(echo $KVER | cut -d. -f2) && - local VER3=$(echo $KVER | cut -d. -f3) && - VER3=${VER3%%[^0-9]*} && - - if (( VER1 > 2 )) || - (( VER2 > 6 )) || - (( VER2 == 6 && VER3 > 14 )) || - spell_ok eudev - then - depends DEVICE-MANAGER - else - message "You have a kernel < 2.6.15, it is too old for" \ - "latest udev.\nUsing udev-old spell instead." && - depends udev-old - fi + depends eudev fi diff --git a/smgl/init.d/DETAILS b/smgl/init.d/DETAILS index 7743084444..f09cf86fbe 100755 --- a/smgl/init.d/DETAILS +++ b/smgl/init.d/DETAILS @@ -1,5 +1,5 @@ SPELL=init.d - VERSION=2.2.17 + VERSION=2.2.18 LICENSE[0]=GPL GATHER_DOCS=off SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION diff --git a/smgl/init.d/FINAL b/smgl/init.d/FINAL index e6218da3b2..f6e71ca7de 100755 --- a/smgl/init.d/FINAL +++ b/smgl/init.d/FINAL @@ -21,12 +21,7 @@ fi sedit "s/DEVICES=.*/DEVICES=$DEVICES/" ${INSTALL_ROOT}/etc/sysconfig/devices -if [ "$DEVICES" == "devfs" ]; then - sedit "s:/dev/tty\(.\):/dev/vc/\1:" ${INSTALL_ROOT}/etc/inittab - message "tty devices in inittab set to $DEVICES/vc/[1-6]" -else - message "tty devices in inittab set to /dev/tty[1-6]" -fi +message "tty devices in inittab set to /dev/tty[1-6]" # remove /etc/inittab from the simpleinit install log # this should work for $INSTALL_ROOT/etc/inittab, too diff --git a/smgl/init.d/HISTORY b/smgl/init.d/HISTORY index 4713171144..7b9965e528 100644 --- a/smgl/init.d/HISTORY +++ b/smgl/init.d/HISTORY @@ -1,3 +1,13 @@ +2019-01-05 Treeve Jelbert <treeve@sourcemage.org> + * DEPENDS init.d/devices: remove linux-2.6 related stuff + remove old eudev support + +2019-01-04 Treeve Jelbert <treeve@sourcemage.org> + * DETAILS: version 2.2.18 + * BUILD CONFIGURE DEPENDS FINAL init.d/devices init.d/devices.conf: + remove devfs stuff + * init.d/devices: remove missing.h stuff + 2018-12-15 Treeve Jelbert <treeve@sourcemage.org> * init.d/devices: fix for modern eudev * DETAILS: version 2.2.17 diff --git a/smgl/init.d/init.d/devices b/smgl/init.d/init.d/devices index 824eea720b..478c43ddbc 100755 --- a/smgl/init.d/init.d/devices +++ b/smgl/init.d/init.d/devices @@ -7,37 +7,8 @@ ESSENTIAL=yes . /etc/init.d/smgl_init . /etc/sysconfig/devices -start_devfs() -{ - if ! [ -e /dev/.devfsd ] - then echo "Mounting devfs on /dev" - mount -n -t devfs devfs /dev - evaluate_retval - fi - - echo "Telling init to reopen file descriptors" - kill -USR1 1 - - if [ ! -x "/sbin/devfsd" ] ; then - ln -sf /proc/self/fd /dev/fd - ln -sf /dev/fd/0 /dev/stdin - ln -sf /dev/fd/1 /dev/stdout - ln -sf /dev/fd/2 /dev/stderr - fi -} - udev_mknodes() { -# eudev creates these; errors if they are already present -UD=`/bin/udevadm --version` -if [[ $UD < '220' ]];then - if [ ! -d $udev_root/fd ]; then - ln -fs /proc/self/fd $udev_root/fd - fi - ln -s /dev/fd/0 $udev_root/stdin - ln -s /dev/fd/1 $udev_root/stdout - ln -s /dev/fd/2 $udev_root/stderr -fi mkdir $udev_root/shm mkdir $udev_root/pts } @@ -55,41 +26,6 @@ start_udev() fi # create some needed stuff udev_mknodes - - # kernel 2.6.15-rc1 and higher don't use hotplug - if [[ $(printf "%s\n%s\n" "$(uname -r)" "2.6.15" | sort -V | head -n 1) \ - = 2.6.15 ]]; then - echo "don't need hotplug for this kernel" - builtin echo > /proc/sys/kernel/hotplug - else - # Now uses udevsend as the hotplug multiplexer - echo "Setting udevsend as hotplug agent" - sysctl -w kernel.hotplug="/sbin/udevsend" > /dev/null 2>&1 - echo "Creating initial udev device nodes" - /sbin/udevstart - fi - - if [ -f /etc/udev/udev.missing ]; then - echo "Processing /etc/udev/udev.missing" - cd /dev - while read line; do - if [ "${line:0:1}" == "#" ]; then continue; fi - for ((i=0; i<7; i++)); do - val[$i]=${line%%:*} - line=${line#*:} - done - if [ "${val[1]}" == "d" ]; then - mkdir ${val[0]} - else - mknod ${val[0]} ${val[1]} ${val[2]} ${val[3]} - fi - chmod ${val[4]} ${val[0]} - chown ${val[5]}:${val[6]} ${val[0]} - done < /etc/udev/udev.missing - cd / - fi - echo "Telling init to reopen file descriptors" - kill -USR1 1 ) } start_static_udev() @@ -98,38 +34,6 @@ start_static_udev() # create some needed stuff - and insist on it udev_mknodes - # kernel 2.6.15-rc1 and higher don't use hotplug - if [[ $(printf "%s\n%s\n" "$(uname -r)" "2.6.15" | sort -V | head -n 1) \ - = 2.6.15 ]]; then - echo "don't need hotplug for this kernel" - builtin echo > /proc/sys/kernel/hotplug - else - # Now uses udevsend as the hotplug multiplexer - echo "Setting udevsend as hotplug agent" - sysctl -w kernel.hotplug="/sbin/udevsend" > /dev/null 2>&1 - echo "Creating initial udev device nodes" - /sbin/udevstart - fi - - if [ -f /etc/udev/udev.missing ]; then - echo "Processing /etc/udev/udev.missing" - cd /dev - while read line; do - if [ "${line:0:1}" == "#" ]; then continue; fi - for ((i=0; i<7; i++)); do - val[$i]=${line%%:*} - line=${line#*:} - done - if [ "${val[1]}" == "d" ]; then - mkdir -p ${val[0]} - else - mknod ${val[0]} ${val[1]} ${val[2]} ${val[3]} - fi - chmod ${val[4]} ${val[0]} - chown ${val[5]}:${val[6]} ${val[0]} - done < /etc/udev/udev.missing - cd / - fi ) } start_static() diff --git a/smgl/init.d/init.d/devices.conf b/smgl/init.d/init.d/devices.conf index e9c9b7526c..528804bde1 100644 --- a/smgl/init.d/init.d/devices.conf +++ b/smgl/init.d/init.d/devices.conf @@ -1,5 +1,5 @@ -# type of device management, "static", "devfs", "udev" or "static_udev" -DEVICES=devfs +# type of device management, "static", "udev" or "static_udev" +DEVICES=udev # RUN_SIZE: maximum size of /run # |