seb rev 8
Add initfs (base files used to init the seb OS
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Mar 06 16:42:57 2017 +0100 (2017-03-06) |
parents | 3085a3c9e292 |
children | d22172a67015 |
files | initfs/etc/busybox.conf initfs/etc/fstab initfs/etc/httpd.conf initfs/etc/init.d/rcS initfs/etc/inittab initfs/etc/profile initfs/etc/seb.conf initfs/var/www/cgi-bin/index.cgi initfs/var/www/index.html |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/initfs/etc/busybox.conf Mon Mar 06 16:42:57 2017 +0100 1.3 @@ -0,0 +1,12 @@ 1.4 +# /etc/busybox.conf: SliTaz GNU/linux Busybox configuration. 1.5 +# 1.6 + 1.7 +[SUID] 1.8 +# Allow command to be run by anyone. 1.9 +su = ssx root.root 1.10 +passwd = ssx root.root 1.11 +loadkmap = ssx root.root 1.12 +mount = ssx root.root 1.13 +reboot = ssx root.root 1.14 +halt = ssx root.root 1.15 +poweroff = ssx root.root
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/initfs/etc/fstab Mon Mar 06 16:42:57 2017 +0100 2.3 @@ -0,0 +1,8 @@ 2.4 +# /etc/fstab: information about static file system. 2.5 +# 2.6 +proc /proc proc defaults 0 0 2.7 +sysfs /sys sysfs defaults 0 0 2.8 +devpts /dev/pts devpts defaults 0 0 2.9 +tmpfs /dev/shm tmpfs defaults 0 0 2.10 +tmpfs /run tmpfs defaults 0 0 2.11 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/initfs/etc/httpd.conf Mon Mar 06 16:42:57 2017 +0100 3.3 @@ -0,0 +1,36 @@ 3.4 +# /etc/httpd.conf: Seb-OS Busybox HTTP web server configuration file. 3.5 + 3.6 +# Server root. 3.7 +H:/var/www 3.8 + 3.9 +# Allow address. 3.10 +A:192.168. 3.11 + 3.12 +# File to open by default. 3.13 +I:index.html 3.14 + 3.15 +# Path to the 404 error page. 3.16 +E404:/var/www/404.html 3.17 + 3.18 +# Require user root on urls starting with /adm/. use passwd system db 3.19 +/adm:root:* 3.20 + 3.21 +# Reverse proxy. 3.22 +#P:/url:[http://]hostname[:port]/new/path 3.23 + 3.24 +# CGI interpreter path. 3.25 +*.sh:/bin/sh 3.26 +*.cgi:/bin/sh 3.27 +#*.py:/usr/bin/python 3.28 +#*.php:/usr/bin/php-cgi 3.29 + 3.30 +# MIME type. 3.31 +.txt:text/plain 3.32 +.css:text/css 3.33 +.xml:text/xml 3.34 +.png:image/png 3.35 +.jpg:image/jpeg 3.36 +.tgz:application/x-tgz 3.37 +.tar.gz:application/x-tgz 3.38 +.tazpkg:application/x-tazpkg 3.39 +.sup:application/x-sup
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/initfs/etc/init.d/rcS Mon Mar 06 16:42:57 2017 +0100 4.3 @@ -0,0 +1,39 @@ 4.4 +#! /bin/sh 4.5 +# 4.6 +# Main boot script for your SliTaz Embedded System 4.7 +# 4.8 +. /lib/libseb.sh 4.9 +. /etc/seb.conf 4.10 + 4.11 +colorize 33 "Processing /etc/init.d/rcS..." 4.12 + 4.13 +# Mount filesystems 4.14 +echo "Mounting filesystems..." 4.15 +/bin/mount proc 4.16 +/bin/mount -a 4.17 + 4.18 +# Populate /dev + config hotplug 4.19 +echo "Population /dev and config hotplug helper..." 4.20 +/bin/touch /dev/mdev.log; /sbin/mdev -s 4.21 +echo "/sbin/mdev" >/proc/sys/kernel/hotplug 4.22 + 4.23 +# Mount vdisk in Qemu or vdisk=/dev/sdb1:/path/to/seb-home.img 4.24 +if blkid | fgrep -q "SebOShome"; then 4.25 + colorize 036 "Mounting seb OS virtual disk on: /home" 4.26 + mount /dev/sda /home 4.27 +fi 4.28 + 4.29 +# Hostname 4.30 +echo "Setting hostname to: $(colorize 033 $host_name)" 4.31 +/bin/hostname ${host_name} 4.32 + 4.33 +# Networking 4.34 +/sbin/ifconfig lo 127.0.0.1 up 4.35 + 4.36 +# Load dumped keymap 4.37 +echo "Loading keyboard map..." 4.38 +/sbin/loadkmap < /usr/share/kmap/default 4.39 + 4.40 +echo "" 4.41 +colorize 035 "Welcome to SliTaz Embedded System" 4.42 +boldify "Login: root"
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/initfs/etc/inittab Mon Mar 06 16:42:57 2017 +0100 5.3 @@ -0,0 +1,11 @@ 5.4 +# /etc/inittab: init configuration for SliTaz GNU/Linux. 5.5 + 5.6 +::sysinit:/etc/init.d/rcS 5.7 + 5.8 +# getty respawn shell invocations for selected ttys 5.9 +tty1::respawn:/sbin/getty 38400 tty1 5.10 +tty2::askfirst:-/bin/sh 5.11 + 5.12 +::ctrlaltdel:/bin/umount -a -r 5.13 +::ctrlaltdel:/sbin/reboot 5.14 +
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/initfs/etc/profile Mon Mar 06 16:42:57 2017 +0100 6.3 @@ -0,0 +1,13 @@ 6.4 +# /etc/profile: system-wide config for the Bourne shells 6.5 + 6.6 +PATH="/usr/sbin:/usr/bin:/sbin:/bin:$HOME/.local/bin" 6.7 +LD_LIBRARY_PATH="/usr/lib:/lib" 6.8 + 6.9 +if [ $(id -u) -eq 0 ]; then 6.10 + PS1='\e[1m\u@\h:\w\#\e[m ' 6.11 +else 6.12 + PS1='\e[1m\u@\h:\w\$\e[m ' 6.13 +fi 6.14 + 6.15 +export PATH LD_LIBRARY_PATH PS1 ignoreeof 6.16 +umask 022
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/initfs/etc/seb.conf Mon Mar 06 16:42:57 2017 +0100 7.3 @@ -0,0 +1,14 @@ 7.4 +# /etc/seb-os.conf: SliTaz Embedded OS main configuration file 7.5 +# 7.6 + 7.7 +# Hostame 7.8 +host_name="seb" 7.9 + 7.10 +# Network interface 7.11 +network_interface="eth0" 7.12 + 7.13 +# Boot time scripts 7.14 +run_scripts="" 7.15 + 7.16 +# Daemons to start at boot 7.17 +run_daemons=""
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/initfs/var/www/cgi-bin/index.cgi Mon Mar 06 16:42:57 2017 +0100 8.3 @@ -0,0 +1,7 @@ 8.4 +#!/bin/sh 8.5 +. /usr/lib/slitaz/httphelper.sh 8.6 +header "Content-Type: text/plain" 8.7 + 8.8 +echo "Hello World!" 8.9 + 8.10 +exit 0
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/initfs/var/www/index.html Mon Mar 06 16:42:57 2017 +0100 9.3 @@ -0,0 +1,11 @@ 9.4 +<!DOCTYPE html> 9.5 +<html lang="en"> 9.6 +<head> 9.7 + <meta charset="utf-8" /> 9.8 + <title>Seb-OS Server</title> 9.9 +</head> 9.10 +<body> 9.11 +<h1>Seb-OS Server</h1> 9.12 +<p>File: /index.html</p> 9.13 +</body> 9.14 +</html>