summaryrefslogtreecommitdiffstats
path: root/smgl/init.d/DEPENDS
blob: e529f4d614be98fbb825e6846289f60114983704 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
depends  simpleinit-msb  &&

if [[ $DEVICES == devfs ]]
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
fi