summaryrefslogtreecommitdiffstats
path: root/smgl/init.d/FINAL
blob: e6218da3b2a3efb6b3e1f3703a4e83c3c6efc14a (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
if  [[ ${INITD_FIRST} == y ]]  ;  then
  install  -m 754  $SCRIPT_DIRECTORY/files/tshutdown  ${INSTALL_ROOT}/sbin/tshutdown
  install  -m 754  $SCRIPT_DIRECTORY/files/smgl-cleanup  \
        ${INSTALL_ROOT}/etc/init.d/runlevels/%S/
fi

if  [  -e  /tmp/devices2dev  ]  ;  then
  for  file  in  $(  cat  /tmp/devices2dev  )  ;  do
    if  [  -f  $file  ]  ;
       then if [ "$file" = "/etc/securetty" ];
           then  cp  $file  $file.$(  date +'%Y%m%d%H%M'  )  &&
                 sedit  's!/devices/!!'  $file
            else cp  $file  $file.$(  date +'%Y%m%d%H%M'  )  &&
                 sedit  's!/devices!/dev!'  $file
            fi
    fi
  done

  rm  /tmp/devices2dev
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

# remove /etc/inittab from the simpleinit install log
# this should work for $INSTALL_ROOT/etc/inittab, too
for i in $INSTALL_LOGS/simpleinit* $MD5SUM_LOGS/simpleinit*
do if [ -f $i ] ; then
  sedit  "/\/etc\/inittab/D"  $i
  fi
done

#
# The next sedit is to fix my (sandalle) update of init.d to 2.1.4
# where casting from a queue (or not using -r) will not reassign
# it. Should be removed in about a month (~20040926)
#
if  grep  -q  "mountall$"  ${INSTALL_ROOT}/etc/sysconfig/facilities;  then
  message "${MESSAGE_COLOR}Fixing ${INSTALL_ROOT}/etc/sysconfig/facilities:local_fs${DEFAULT_COLOR}"  &&
  sedit  's:mountall:mountall.sh:'  ${INSTALL_ROOT}/etc/sysconfig/facilities
fi  &&
#
# End rename fix
#

rm $INSTALL_ROOT/etc/init.d/runlevels/%2/sorbus-aria &&
true