Boot boot Script/etc/init.d/rcs

Source: Internet
Author: User
Tags mkdir

With the help of the startup script, you can set up a variety of programs to run automatically after boot, or you can set other system settings, which is

Similar to the Autobat automatic batch file in Windows system, the startup script is located in the/etc/init.d/rcs of the board

as follows (the actual content may not be exactly the same as this):

#! /bin/sh

Path=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin: # #设置默认有效执行路径

Runlevel=s # #用户等级, here: Single user

Prevlevel=n

Umask 022

Export PATH runlevel Prevlevel

#

# Trap Ctrl-c &c only in the shell so we can interrupt subprocesses.

#

Trap ":" INT QUIT TSTP

#SCSI Modules

#Input Modules

#/sbin/insmod/lib/input.o

#/sbin/insmod/lib/keybdev.o

#/sbin/insmod/lib/mousedev.o

#/sbin/insmod/lib/evdev.o

#Charactor Modules

/bin/ln-s/dev/fb/0/dev/fb0 # #FrameBuffer Symbolic Join

/bin/ln-s/dev/vc/0/dev/tty1

/bin/ln-s/DEV/SOUND/DSP/DEV/DSP #声音设备的符号联接

/bin/ln-s/dev/sound/mixer/dev/mixer #声音设备的符号联接

/bin/ln-s/dev/scsi/host1/bus0/target0/lun0/part1/dev/sda1

#设置常用临时目录

/BIN/MOUNT-T proc None/proc

/bin/mount-t Tmpfs none/tmp

/bin/mount-t Tmpfs None/var

/bin/mkdir-p/var/lib

/bin/mkdir-p/var/run

/bin/mkdir-p/var/log

#Usb devices

#/sbin/insmod/lib/hid-core.o

#/sbin/insmod/lib/usbmouse.o

#/sbin/insmod/lib/usbkbd.o

#Netcard

#/sbin/insmod/lib/cs8900a.o

#各种服务程序

/etc/rc.d/init.d/netd Start # TELNET/FTP Service

/ETC/RC.D/INIT.D/HTTPD Start # Web Server service

/etc/rc.d/init.d/leds Start # LED service

/sbin/ifconfig Lo 127.0.0.1 #本地回环设备ip address

/sbin/ifconfig eth0 192.168.1.230 up #本机ip address,

/sbin/madplay/shanghaitan.mp3 & #开机后自动运行madplay Play mp3, users can add their own boot program

/bin/hostname-f/etc/sysconfig/hostname


Turn from: http://www.360doc.com/content/10/1030/15/4273156_65243328.shtml

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.