|
Embedded Linux Primer: A Practical, Real-World ApproachIn the next section, we look at some typical system configurations and the required entries in the startup scripts to enable these configurations. 6.3.2. Example Web Server Startup Script Although simple, this example startup script is designed to illustrate the mechanism and guide you in designing your own system startup and shutdown behavior. This example is based on busybox, which has a slightly different initialization behavior than init. These differences are covered in detail in Chapter 11. In a typical embedded appliance that contains a web server, we might want several servers available for maintenance and remote access. In this example, we enable servers for HTTP and Telnet access (via inetd). Listing 6-8 contains a simple rc.sysinit script for our hypothetical web server appliance. Listing 6-8. Web Server rc.sysinit #!/bin/sh echo "This is rc.sysinit" busybox mount -t proc none /proc # Load the system loggers syslogd klogd # Enable legacy PTY support for telnetd busybox mkdir /dev/pts busybox mknod /dev/ptmx c 5 2 busybox mount -t devpts devpts /dev/pts In this simple initialization script, we first enable the proc file system ...» |
Код для вставки книги в блог HTML
phpBB
текст
|
|