LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 804|回复: 1

系统启动(init=3)时,/etc/rc3.d/S99mysql运行的$1居然是stop

[复制链接]
发表于 2006-10-30 13:49:35 | 显示全部楼层 |阅读模式
系统是centos 4.4 on i386, 2Gram, 3G P4 cpu.

因为一些遗留应用,要运行mysql4.0,因此在mysql.com的网站上下载了mysql-server-4.0.27,然后安装, 之后写了个配置文件/etc/my.cnf,现在手动/etc/init.d/mysql start |stop 都很正常,奇怪的是系统自动启动是mysql却没有启动,于是在/etc/init.d/mysql里面加上了set -x,下面是启动的日志, 奇怪的是$1=stop,就是这个问题造成mysql没有启动, 不知道是什么原因。
  1. [root@oa-server ~]# tail -n 150 /var/log/boot.log
  2. Oct 30 12:27:17 oa-server rc.sysinit: Checking root filesystem succeeded
  3. Oct 30 12:27:17 oa-server rc.sysinit: Remounting root filesystem in read-write mode:  succeeded
  4. Oct 30 12:27:17 oa-server lvm.static:   No volume groups found
  5. Oct 30 12:27:17 oa-server rc.sysinit: Setting up Logical Volume Management: succeeded
  6. Oct 30 12:27:17 oa-server fsck: /boot: clean, 38/30120 files, 11152/120456 blocks
  7. Oct 30 12:27:18 oa-server fsck: /var: clean, 16830/8044544 files, 2696994/16060983 blocks
  8. Oct 30 12:27:18 oa-server rc.sysinit: Checking filesystems succeeded
  9. Oct 30 12:27:18 oa-server rc.sysinit: Mounting local filesystems:  succeeded
  10. Oct 30 12:27:18 oa-server rc.sysinit: Enabling local filesystem quotas:  succeeded
  11. Oct 30 12:27:18 oa-server rc.sysinit: Enabling swap space:  succeeded
  12. Oct 30 12:27:19 oa-server microcode_ctl: microcode_ctl startup succeeded
  13. Oct 30 12:27:24 oa-server kudzu:  succeeded
  14. Oct 30 12:27:24 oa-server sysctl: net.ipv4.ip_forward = 0
  15. Oct 30 12:27:24 oa-server sysctl: net.ipv4.conf.default.rp_filter = 1
  16. Oct 30 12:27:24 oa-server sysctl: net.ipv4.conf.default.accept_source_route = 0
  17. Oct 30 12:27:24 oa-server sysctl: kernel.sysrq = 0
  18. Oct 30 12:27:24 oa-server sysctl: kernel.core_uses_pid = 1
  19. Oct 30 12:27:24 oa-server network: Setting network parameters:  succeeded
  20. Oct 30 12:27:34 oa-server named: named startup succeeded
  21. Oct 30 12:27:24 oa-server network: Bringing up loopback interface:  succeeded
  22. Oct 30 12:27:26 oa-server network: Bringing up interface eth0:  succeeded
  23. Oct 30 12:27:30 oa-server network: Bringing up interface eth1:  succeeded
  24. Oct 30 12:27:34 oa-server auditd: auditd startup succeeded
  25. Oct 30 12:27:35 oa-server autofs: automount startup succeeded
  26. Oct 30 12:27:35 oa-server smartd: smartd startup succeeded
  27. Oct 30 12:27:35 oa-server sshd:  succeeded
  28. Oct 30 12:27:36 oa-server xinetd: xinetd startup succeeded
  29. Oct 30 12:27:36 oa-server gpm: gpm startup succeeded
  30. Oct 30 12:27:37 oa-server httpd: httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
  31. Oct 30 12:27:38 oa-server httpd: httpd startup succeeded
  32. Oct 30 12:27:38 oa-server resin: Starting resin:
  33. Oct 30 12:27:39 oa-server resin: Resin httpd start at һ 10�� 30 12:27:39 CST 2006
  34. Oct 30 12:27:54 oa-server resin:
  35. Oct 30 12:27:54 oa-server rc: Starting resin:  succeeded
  36. Oct 30 12:27:54 oa-server crond: crond startup succeeded
  37. Oct 30 12:27:54 oa-server anacron: anacron startup succeeded
  38. Oct 30 12:27:54 oa-server atd: atd startup succeeded
  39. Oct 30 12:27:55 oa-server messagebus: messagebus startup succeeded
  40. Oct 30 12:27:55 oa-server haldaemon: haldaemon startup succeeded
  41. Oct 30 13:07:35 oa-server mysql: + basedir=/usr
  42. Oct 30 13:07:35 oa-server mysql: + datadir=/var/lib/mysql
  43. Oct 30 13:07:35 oa-server mysql: + pid_file=/var/run/mysqld/mysqld.pid
  44. Oct 30 13:07:35 oa-server mysql: + test -z /usr
  45. Oct 30 13:07:35 oa-server mysql: + bindir=/usr/bin
  46. Oct 30 13:07:35 oa-server mysql: + PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin
  47. Oct 30 13:07:35 oa-server mysql: + export PATH
  48. Oct 30 13:07:35 oa-server mysql: + mode=stop
  49. Oct 30 13:07:35 oa-server mysql: + case `echo "testing\c"`,`echo -n testing` in
  50. Oct 30 13:07:35 oa-server mysql: ++ echo 'testing\c'
  51. Oct 30 13:07:35 oa-server mysql: ++ echo -n testing
  52. Oct 30 13:07:35 oa-server mysql: + echo_n=-n
  53. Oct 30 13:07:35 oa-server mysql: + echo_c=
  54. Oct 30 13:07:35 oa-server mysql: + test -x ./bin/my_print_defaults
  55. Oct 30 13:07:35 oa-server mysql: + test -x /usr/bin/my_print_defaults
  56. Oct 30 13:07:35 oa-server mysql: + print_defaults=/usr/bin/my_print_defaults
  57. Oct 30 13:07:35 oa-server mysql: + extra_args=
  58. Oct 30 13:07:35 oa-server mysql: + test /var/lib/mysql '!=' /var/lib/mysql
  59. Oct 30 13:07:35 oa-server mysql: No mysqld pid file found. Looked for /var/run/mysqld/mysqld.pid.
  60. Oct 30 13:07:35 oa-server mysql: ++ /usr/bin/my_print_defaults mysqld mysql_server mysql.server
  61. Oct 30 13:07:35 oa-server mysql: + parse_arguments --datadir=/var/lib/mysql --socket=/var/run/mysqld/mysqld.sock --user=mysql --basedir=/var/lib
  62. Oct 30 13:07:35 oa-server mysql: + for arg in '"$@"'
  63. Oct 30 13:07:35 oa-server mysql: + case "$arg" in
  64. Oct 30 13:07:35 oa-server mysql: ++ echo --datadir=/var/lib/mysql
  65. Oct 30 13:07:35 oa-server mysql: ++ sed -e 's/^[^=]*=//'
  66. Oct 30 13:07:35 oa-server mysql: + datadir=/var/lib/mysql
  67. Oct 30 13:07:35 oa-server mysql: + for arg in '"$@"'
  68. Oct 30 13:07:35 oa-server mysql: + case "$arg" in
  69. Oct 30 13:07:35 oa-server mysql: + for arg in '"$@"'
  70. Oct 30 13:07:35 oa-server mysql: + case "$arg" in
  71. Oct 30 13:07:35 oa-server mysql: + for arg in '"$@"'
  72. Oct 30 13:07:35 oa-server mysql: + case "$arg" in
  73. Oct 30 13:07:35 oa-server mysql: ++ echo --basedir=/var/lib
  74. Oct 30 13:07:35 oa-server mysql: ++ sed -e 's/^[^=]*=//'
  75. Oct 30 13:07:35 oa-server mysql: + basedir=/var/lib
  76. Oct 30 13:07:35 oa-server mysql: + test -z /var/run/mysqld/mysqld.pid
  77. Oct 30 13:07:35 oa-server mysql: + case "$pid_file" in
  78. Oct 30 13:07:35 oa-server mysql: + cd /var/lib
  79. Oct 30 13:07:35 oa-server mysql: + case "$mode" in
  80. Oct 30 13:07:35 oa-server mysql: + test -s /var/run/mysqld/mysqld.pid
  81. Oct 30 13:07:35 oa-server mysql: + echo 'No mysqld pid file found. Looked for /var/run/mysqld/mysqld.pid.'
  82. Oct 30 13:07:35 oa-server rc: Stopping mysql:  succeeded
  83. Oct 30 13:07:35 oa-server haldaemon: haldaemon -TERM succeeded
  84. Oct 30 13:07:36 oa-server messagebus: messagebus -TERM succeeded
  85. Oct 30 13:07:36 oa-server atd: atd shutdown succeeded
  86. Oct 30 13:07:38 oa-server gpm: gpm shutdown succeeded
  87. Oct 30 13:07:39 oa-server httpd: httpd shutdown succeeded
  88. Oct 30 13:07:39 oa-server sshd: sshd -TERM succeeded
  89. Oct 30 13:07:39 oa-server smartd: smartd shutdown succeeded
  90. Oct 30 13:07:39 oa-server xinetd: xinetd shutdown succeeded
  91. Oct 30 13:07:40 oa-server crond: crond shutdown succeeded
  92. Oct 30 13:07:40 oa-server auditd: auditd shutdown succeeded
  93. Oct 30 13:07:40 oa-server irqbalance: irqbalance shutdown succeeded
  94. Oct 30 13:07:40 oa-server named: named -TERM succeeded
  95. Oct 30 13:07:40 oa-server named:  succeeded
  96. Oct 30 13:09:46 oa-server syslog: syslogd startup succeeded
  97. Oct 30 13:09:46 oa-server syslog: klogd startup succeeded
  98. Oct 30 13:09:46 oa-server irqbalance: irqbalance startup succeeded
  99. Oct 30 21:09:30 oa-server rc.sysinit: -e
  100. Oct 30 21:09:32 oa-server start_udev: Starting udev:  succeeded
  101. Oct 30 21:09:36 oa-server rc.sysinit: -e
  102. Oct 30 21:09:36 oa-server sysctl: net.ipv4.ip_forward = 0
  103. Oct 30 21:09:36 oa-server sysctl: net.ipv4.conf.default.rp_filter = 1
  104. Oct 30 21:09:36 oa-server sysctl: net.ipv4.conf.default.accept_source_route = 0
  105. Oct 30 21:09:36 oa-server sysctl: kernel.sysrq = 0
  106. Oct 30 21:09:36 oa-server sysctl: kernel.core_uses_pid = 1
  107. Oct 30 21:09:36 oa-server rc.sysinit: Configuring kernel parameters:  succeeded
  108. Oct 30 13:09:33 oa-server date: Mon Oct 30 13:09:33 CST 2006
  109. Oct 30 13:09:33 oa-server rc.sysinit: Setting clock  (localtime): Mon Oct 30 13:09:33 CST 2006 succeeded
  110. Oct 30 13:09:33 oa-server rc.sysinit: Loading default keymap succeeded
  111. Oct 30 13:09:33 oa-server rc.sysinit: Setting hostname oa-server:  succeeded
  112. Oct 30 13:09:33 oa-server fsck: /: clean, 50346/652800 files, 386771/1305281 blocks
  113. Oct 30 13:09:33 oa-server rc.sysinit: Checking root filesystem succeeded
  114. Oct 30 13:09:33 oa-server rc.sysinit: Remounting root filesystem in read-write mode:  succeeded
  115. Oct 30 13:09:49 oa-server named: named startup succeeded
  116. Oct 30 13:09:33 oa-server lvm.static:   No volume groups found
  117. Oct 30 13:09:33 oa-server rc.sysinit: Setting up Logical Volume Management: succeeded
  118. Oct 30 13:09:33 oa-server fsck: /boot: clean, 38/30120 files, 11152/120456 blocks
  119. Oct 30 13:09:34 oa-server fsck: /var: clean, 16834/8044544 files, 2697120/16060983 blocks
  120. Oct 30 13:09:34 oa-server rc.sysinit: Checking filesystems succeeded
  121. Oct 30 13:09:34 oa-server rc.sysinit: Mounting local filesystems:  succeeded
  122. Oct 30 13:09:34 oa-server rc.sysinit: Enabling local filesystem quotas:  succeeded
  123. Oct 30 13:09:34 oa-server rc.sysinit: Enabling swap space:  succeeded
  124. Oct 30 13:09:35 oa-server microcode_ctl: microcode_ctl startup succeeded
  125. Oct 30 13:09:49 oa-server auditd: auditd startup succeeded
  126. Oct 30 13:09:40 oa-server kudzu:  succeeded
  127. Oct 30 13:09:40 oa-server sysctl: net.ipv4.ip_forward = 0
  128. Oct 30 13:09:40 oa-server sysctl: net.ipv4.conf.default.rp_filter = 1
  129. Oct 30 13:09:40 oa-server sysctl: net.ipv4.conf.default.accept_source_route = 0
  130. Oct 30 13:09:40 oa-server sysctl: kernel.sysrq = 0
  131. Oct 30 13:09:40 oa-server sysctl: kernel.core_uses_pid = 1
  132. Oct 30 13:09:40 oa-server network: Setting network parameters:  succeeded
  133. Oct 30 13:09:40 oa-server network: Bringing up loopback interface:  succeeded
  134. Oct 30 13:09:41 oa-server network: Bringing up interface eth0:  succeeded
  135. Oct 30 13:09:46 oa-server network: Bringing up interface eth1:  succeeded
  136. Oct 30 13:09:51 oa-server autofs: automount startup succeeded
  137. Oct 30 13:09:51 oa-server smartd: smartd startup succeeded
  138. Oct 30 13:09:52 oa-server sshd:  succeeded
  139. Oct 30 13:09:52 oa-server xinetd: xinetd startup succeeded
  140. Oct 30 13:09:52 oa-server gpm: gpm startup succeeded
  141. Oct 30 13:09:53 oa-server httpd: httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
  142. Oct 30 13:09:54 oa-server httpd: httpd startup succeeded
  143. Oct 30 13:09:54 oa-server resin: Starting resin:
  144. Oct 30 13:09:55 oa-server resin: Resin httpd start at һ 10�� 30 13:09:55 CST 2006
  145. Oct 30 13:10:10 oa-server resin:
  146. Oct 30 13:10:10 oa-server rc: Starting resin:  succeeded
  147. Oct 30 13:10:10 oa-server crond: crond startup succeeded
  148. Oct 30 13:10:11 oa-server anacron: anacron startup succeeded
  149. Oct 30 13:10:11 oa-server atd: atd startup succeeded
  150. Oct 30 13:10:11 oa-server messagebus: messagebus startup succeeded
  151. Oct 30 13:10:11 oa-server haldaemon: haldaemon startup succeeded
  152. [root@oa-server ~]#
复制代码

启动脚本:
  1. [root@oa-server rc3.d]# cat /etc/init.d/mysql |grep '^[^#].*$'
  2. set -x
  3. basedir=/usr
  4. datadir=/var/lib/mysql
  5. pid_file=/var/run/mysqld/mysqld.pid
  6. if test -z "$basedir"
  7. then
  8.   basedir=/
  9.   bindir=/usr/bin
  10. else
  11.   bindir="$basedir/bin"
  12. fi
  13. PATH=/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin
  14. export PATH
  15. mode=$1    # start or stop
  16. case `echo "testing\c"`,`echo -n testing` in
  17.     *c*,-n*) echo_n=   echo_c=     ;;
  18.     *c*,*)   echo_n=-n echo_c=     ;;
  19.     *)       echo_n=   echo_c='\c' ;;
  20. esac
  21. parse_arguments() {
  22.   for arg do
  23.     case "$arg" in
  24.       --basedir=*)  basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
  25.       --datadir=*)  datadir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
  26.       --pid-file=*) pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
  27.     esac
  28.   done
  29. }
  30. if test -x ./bin/my_print_defaults
  31. then
  32.   print_defaults="./bin/my_print_defaults"
  33. elif test -x $bindir/my_print_defaults
  34. then
  35.   print_defaults="$bindir/my_print_defaults"
  36. elif test -x $bindir/mysql_print_defaults
  37. then
  38.   print_defaults="$bindir/mysql_print_defaults"
  39. else
  40.   # Try to find basedir in /etc/my.cnf
  41.   conf=/etc/my.cnf
  42.   print_defaults=
  43.   if test -r $conf
  44.   then
  45.     subpat='^[^=]*basedir[^=]*=\(.*\)$'
  46.     dirs=`sed -e "/$subpat/!d" -e 's//\1/' $conf`
  47.     for d in $dirs
  48.     do
  49.       d=`echo $d | sed -e 's/[  ]//g'`
  50.       if test -x "$d/bin/my_print_defaults"
  51.       then
  52.         print_defaults="$d/bin/my_print_defaults"
  53.         break
  54.       fi
  55.       if test -x "$d/bin/mysql_print_defaults"
  56.       then
  57.         print_defaults="$d/bin/mysql_print_defaults"
  58.         break
  59.       fi
  60.     done
  61.   fi
  62.   # Hope it's in the PATH ... but I doubt it
  63.   test -z "$print_defaults" && print_defaults="my_print_defaults"
  64. fi
  65. extra_args=""
  66. if test "$datadir" != "/var/lib/mysql"
  67. then
  68.   extra_args="-e $datadir/my.cnf"
  69. fi
  70. parse_arguments `$print_defaults $extra_args mysqld mysql_server mysql.server`
  71. if test -z "$pid_file"
  72. then
  73.   pid_file=$datadir/`/bin/hostname`.pid
  74. else
  75.   case "$pid_file" in
  76.     /* ) ;;
  77.     * )  pid_file="$datadir/$pid_file" ;;
  78.   esac
  79. fi
  80. cd $basedir
  81. case "$mode" in
  82.   'start')
  83.     # Start daemon
  84.     if test -x $bindir/mysqld_safe
  85.     then
  86.       # Give extra arguments to mysqld with the my.cnf file. This script may
  87.       # be overwritten at next upgrade.
  88.         sleep 3
  89.         $bindir/mysqld_safe --defaults-file=/etc/my.cnf >/dev/null 2>&1 &
  90.         sleep 3
  91.       # Make lock for RedHat / SuSE
  92.       if test -w /var/lock/subsys
  93.       then
  94.         touch /var/lock/subsys/mysql
  95.       fi
  96.     else
  97.       echo "Can't execute $bindir/mysqld_safe from dir $basedir"
  98.     fi
  99.     ;;
  100.   'stop')
  101.     # Stop daemon. We use a signal here to avoid having to know the
  102.     # root password.
  103.     if test -s "$pid_file"
  104.     then
  105.       mysqld_pid=`cat $pid_file`
  106.       echo "Killing mysqld with pid $mysqld_pid"
  107.       kill $mysqld_pid
  108.       # mysqld should remove the pid_file when it exits, so wait for it.
  109.       sleep 1
  110.       while [ -s $pid_file -a "$flags" != aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ]
  111.       do
  112.         [ -z "$flags" ] && echo $echo_n "Wait for mysqld to exit$echo_c" || echo $echo_n ".$echo_c"
  113.         flags=a$flags
  114.         sleep 1
  115.       done
  116.       if [ -s $pid_file ]
  117.          then echo " gave up waiting!"
  118.       elif [ -n "$flags" ]
  119.          then echo " done"
  120.       fi
  121.       # delete lock for RedHat / SuSE
  122.       if test -f /var/lock/subsys/mysql
  123.       then
  124.         rm -f /var/lock/subsys/mysql
  125.       fi
  126.     else
  127.       echo "No mysqld pid file found. Looked for $pid_file."
  128.     fi
  129.     ;;
  130.   'restart')
  131.     # Stop the service and regardless of whether it was
  132.     # running or not, start it again.
  133.     $0 stop
  134.     $0 start
  135.                 ;;
  136.   *)
  137.     # usage
  138.     echo "Usage: $0 start|stop|restart"
  139.     exit 1
  140.     ;;
  141. esac
  142. [root@oa-server rc3.d]#
复制代码


配置文件
  1. [root@oa-server rc3.d]# cat /etc/my.cnf |grep '^[^#].*$'
  2. [mysqld]
  3. datadir=/var/lib/mysql
  4. socket=/var/run/mysqld/mysqld.sock
  5. [mysql.server]
  6. user=mysql
  7. basedir=/var/lib
  8. [mysqld_safe]
  9. err-log=/var/log/mysql/mysqld.log
  10. pid-file=/var/run/mysqld/mysqld.pid
  11. [client]
  12. port            = 3306
  13. socket         =/var/run/mysqld/mysqld.sock
  14. [root@oa-server rc3.d]#
复制代码
 楼主| 发表于 2006-10-30 13:54:28 | 显示全部楼层
不对, 看错了, 那是关闭的时候,所以$1=stop.


似乎启动的时候没有运行S99mysql...


  1. [root@oa-server rc3.d]#             ls -al
  2. total 260
  3. drwxr-xr-x   2 root root 4096 Oct 30 13:06 .
  4. drwxr-xr-x  10 root root 4096 Oct 30 13:03 ..
  5. lrwxrwxrwx   1 root root   13 Oct 30 12:24 K01yum -> ../init.d/yum
  6. lrwxrwxrwx   1 root root   24 Oct 30 12:24 K02NetworkManager -> ../init.d/NetworkManager
  7. lrwxrwxrwx   1 root root   15 Oct 30 12:24 K03rhnsd -> ../init.d/rhnsd
  8. lrwxrwxrwx   1 root root   19 Oct 30 12:24 K05saslauthd -> ../init.d/saslauthd
  9. lrwxrwxrwx   1 root root   14 Oct 30 12:24 K10cups -> ../init.d/cups
  10. lrwxrwxrwx   1 root root   19 Oct 30 12:24 K10dc_server -> ../init.d/dc_server
  11. lrwxrwxrwx   1 root root   16 Oct 30 12:24 K10psacct -> ../init.d/psacct
  12. lrwxrwxrwx   1 root root   13 Oct 30 12:24 K10xfs -> ../init.d/xfs
  13. lrwxrwxrwx   1 root root   19 Oct 30 12:24 K12dc_client -> ../init.d/dc_client
  14. lrwxrwxrwx   1 root root   13 Oct 30 12:24 K20nfs -> ../init.d/nfs
  15. lrwxrwxrwx   1 root root   14 Oct 30 12:24 K24irda -> ../init.d/irda
  16. lrwxrwxrwx   1 root root   15 Oct 30 12:24 K25squid -> ../init.d/squid
  17. lrwxrwxrwx   1 root root   18 Oct 30 12:24 K30sendmail -> ../init.d/sendmail
  18. lrwxrwxrwx   1 root root   13 Oct 30 12:24 K35smb -> ../init.d/smb
  19. lrwxrwxrwx   1 root root   17 Oct 30 12:24 K35winbind -> ../init.d/winbind
  20. lrwxrwxrwx   1 root root   17 Oct 30 12:24 K50netdump -> ../init.d/netdump
  21. lrwxrwxrwx   1 root root   13 Oct 30 12:24 K50tux -> ../init.d/tux
  22. lrwxrwxrwx   1 root root   16 Oct 30 12:24 K50vsftpd -> ../init.d/vsftpd
  23. lrwxrwxrwx   1 root root   15 Oct 30 12:24 K56acpid -> ../init.d/acpid
  24. lrwxrwxrwx   1 root root   19 Oct 30 12:24 K68rpcidmapd -> ../init.d/rpcidmapd
  25. lrwxrwxrwx   1 root root   17 Oct 30 12:24 K69rpcgssd -> ../init.d/rpcgssd
  26. lrwxrwxrwx   1 root root   16 Oct 30 12:24 K73ypbind -> ../init.d/ypbind
  27. lrwxrwxrwx   1 root root   14 Oct 30 12:24 K74nscd -> ../init.d/nscd
  28. lrwxrwxrwx   1 root root   15 Oct 30 12:24 K75netfs -> ../init.d/netfs
  29. lrwxrwxrwx   1 root root   15 Oct 30 12:24 K85mdmpd -> ../init.d/mdmpd
  30. lrwxrwxrwx   1 root root   17 Oct 30 12:24 K86nfslock -> ../init.d/nfslock
  31. lrwxrwxrwx   1 root root   17 Oct 30 12:24 K87portmap -> ../init.d/portmap
  32. lrwxrwxrwx   1 root root   18 Oct 30 12:24 K89netplugd -> ../init.d/netplugd
  33. lrwxrwxrwx   1 root root   19 Oct 30 12:24 K90bluetooth -> ../init.d/bluetooth
  34. lrwxrwxrwx   1 root root   14 Oct 30 12:24 K91isdn -> ../init.d/isdn
  35. lrwxrwxrwx   1 root root   18 Oct 30 12:24 K92iptables -> ../init.d/iptables
  36. lrwxrwxrwx   1 root root   18 Oct 30 12:24 K94diskdump -> ../init.d/diskdump
  37. lrwxrwxrwx   1 root root   16 Oct 30 12:24 K96pcmcia -> ../init.d/pcmcia
  38. lrwxrwxrwx   1 root root   18 Oct 30 12:24 K99cpuspeed -> ../init.d/cpuspeed
  39. lrwxrwxrwx   1 root root   19 Oct 30 12:24 K99readahead -> ../init.d/readahead
  40. lrwxrwxrwx   1 root root   25 Oct 30 12:24 K99readahead_early -> ../init.d/readahead_early
  41. lrwxrwxrwx   1 root root   23 Oct 30 12:24 S00microcode_ctl -> ../init.d/microcode_ctl
  42. lrwxrwxrwx   1 root root   15 Oct 30 12:24 S05kudzu -> ../init.d/kudzu
  43. lrwxrwxrwx   1 root root   17 Oct 30 12:24 S10network -> ../init.d/network
  44. lrwxrwxrwx   1 root root   16 Oct 30 12:24 S12syslog -> ../init.d/syslog
  45. lrwxrwxrwx   1 root root   20 Oct 30 12:24 S13irqbalance -> ../init.d/irqbalance
  46. lrwxrwxrwx   1 root root   15 Oct 30 12:24 S13named -> ../init.d/named
  47. lrwxrwxrwx   1 root root   19 Oct 30 12:24 S15mdmonitor -> ../init.d/mdmonitor
  48. lrwxrwxrwx   1 root root   16 Oct 30 12:24 S18auditd -> ../init.d/auditd
  49. lrwxrwxrwx   1 root root   16 Oct 30 12:24 S19vmware -> ../init.d/vmware
  50. lrwxrwxrwx   1 root root   14 Oct 30 12:24 S26apmd -> ../init.d/apmd
  51. lrwxrwxrwx   1 root root   16 Oct 30 12:24 S28autofs -> ../init.d/autofs
  52. lrwxrwxrwx   1 root root   16 Oct 30 12:24 S40smartd -> ../init.d/smartd
  53. lrwxrwxrwx   1 root root   14 Oct 30 12:24 S55sshd -> ../init.d/sshd
  54. lrwxrwxrwx   1 root root   20 Oct 30 12:24 S56rawdevices -> ../init.d/rawdevices
  55. lrwxrwxrwx   1 root root   16 Oct 30 12:24 S56xinetd -> ../init.d/xinetd
  56. lrwxrwxrwx   1 root root   13 Oct 30 12:24 S85gpm -> ../init.d/gpm
  57. lrwxrwxrwx   1 root root   15 Oct 30 12:24 S85httpd -> ../init.d/httpd
  58. lrwxrwxrwx   1 root root   15 Oct 30 12:24 S85resin -> ../init.d/resin
  59. lrwxrwxrwx   1 root root   15 Oct 30 12:24 S90crond -> ../init.d/crond
  60. lrwxrwxrwx   1 root root   17 Oct 30 12:24 S95anacron -> ../init.d/anacron
  61. lrwxrwxrwx   1 root root   13 Oct 30 12:24 S95atd -> ../init.d/atd
  62. lrwxrwxrwx   1 root root   20 Oct 30 12:24 S97messagebus -> ../init.d/messagebus
  63. lrwxrwxrwx   1 root root   19 Oct 30 12:24 S98haldaemon -> ../init.d/haldaemon
  64. lrwxrwxrwx   1 root root   11 Oct 23 16:10 S99local -> ../rc.local
  65. lrwxrwxrwx   1 root root   15 Oct 30 09:50 S99mysql -> ../init.d/mysql
  66. [root@oa-server rc3.d]#
  67. [root@oa-server rc3.d]# cat /etc/inittab
  68. #
  69. # inittab       This file describes how the INIT process should set up
  70. #               the system in a certain run-level.
  71. #
  72. # Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
  73. #               Modified for RHS Linux by Marc Ewing and Donnie Barnes
  74. #
  75. # Default runlevel. The runlevels used by RHS are:
  76. #   0 - halt (Do NOT set initdefault to this)
  77. #   1 - Single user mode
  78. #   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
  79. #   3 - Full multiuser mode
  80. #   4 - unused
  81. #   5 - X11
  82. #   6 - reboot (Do NOT set initdefault to this)
  83. #
  84. id:3:initdefault:
  85. # System initialization.
  86. si::sysinit:/etc/rc.d/rc.sysinit
  87. l0:0:wait:/etc/rc.d/rc 0
  88. l1:1:wait:/etc/rc.d/rc 1
  89. l2:2:wait:/etc/rc.d/rc 2
  90. l3:3:wait:/etc/rc.d/rc 3
  91. l4:4:wait:/etc/rc.d/rc 4
  92. l5:5:wait:/etc/rc.d/rc 5
  93. l6:6:wait:/etc/rc.d/rc 6
  94. # Trap CTRL-ALT-DELETE
  95. ca::ctrlaltdel:/sbin/shutdown -t3 -r now
  96. # When our UPS tells us power has failed, assume we have a few minutes
  97. # of power left.  Schedule a shutdown for 2 minutes from now.
  98. # This does, of course, assume you have powerd installed and your
  99. # UPS connected and working correctly.
  100. pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"
  101. # If power was restored before the shutdown kicked in, cancel it.
  102. pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
  103. # Run gettys in standard runlevels
  104. 1:2345:respawn:/sbin/mingetty tty1
  105. 2:2345:respawn:/sbin/mingetty tty2
  106. 3:2345:respawn:/sbin/mingetty tty3
  107. 4:2345:respawn:/sbin/mingetty tty4
  108. 5:2345:respawn:/sbin/mingetty tty5
  109. 6:2345:respawn:/sbin/mingetty tty6
  110. # Run xdm in runlevel 5
  111. x:5:respawn:/etc/X11/prefdm -nodaemon
  112. [root@oa-server rc3.d]#
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表