add stuff
This commit is contained in:
parent
91140888db
commit
1cd4394841
12 changed files with 1702 additions and 18 deletions
54
etc/init.rc
Normal file
54
etc/init.rc
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# bajia init.rc - example configuration for an embedded/VM system.
|
||||
#
|
||||
# constructs:
|
||||
# service NAME /path/to/exe [args...]
|
||||
# user|group|oneshot|disabled|console|class|respawn|crash-*|setenv|cwd
|
||||
#
|
||||
# on TRIGGER
|
||||
# start NAME | stop NAME | restart NAME
|
||||
# exec /cmd args... (run synchronously, wait to finish)
|
||||
# mkdir PATH [mode]
|
||||
# chmod PATH mode
|
||||
# chown PATH uid gid
|
||||
# setenv K V
|
||||
# write PATH CONTENT
|
||||
# symlink TARGET LINK
|
||||
# mount SOURCE TARGET FSTYPE
|
||||
# log message...
|
||||
#
|
||||
# standard trigger sequence run at boot: early-init, init, boot.
|
||||
# future: property:<key>=<value>, service-started:<name>.
|
||||
|
||||
on early-init
|
||||
mount proc /proc proc
|
||||
mount sysfs /sys sysfs
|
||||
mount devtmpfs /dev devtmpfs
|
||||
mkdir /dev/pts 0755
|
||||
mount devpts /dev/pts devpts
|
||||
mkdir /run 0755
|
||||
mount tmpfs /run tmpfs
|
||||
|
||||
on init
|
||||
exec /sbin/modprobe virtio_rng
|
||||
write /proc/sys/kernel/hostname bajia
|
||||
log **** bajia init on-line ****
|
||||
|
||||
on boot
|
||||
start console
|
||||
start watchdog
|
||||
|
||||
# the console service: bind stdio to /dev/console, always respawn.
|
||||
service console /sbin/getty -L ttyS0 115200 vt100
|
||||
class core
|
||||
console
|
||||
user root
|
||||
|
||||
# a long-lived example daemon. respawning is the default (always).
|
||||
service watchdog /usr/sbin/watchdog
|
||||
class core
|
||||
respawn always
|
||||
|
||||
# a one-shot job: runs once, exits, never respawns.
|
||||
service boot-logo /usr/bin/show-boot-logo
|
||||
class late
|
||||
oneshot
|
||||
Loading…
Add table
Add a link
Reference in a new issue