# HG changeset patch # User Christophe Lincoln # Date 1488814977 -3600 # Node ID 68f0c6c3b1d34d2ab3b8542a69890b23684be762 # Parent 3085a3c9e29220e6bd5245483eb11979bae4e130 Add initfs (base files used to init the seb OS diff -r 3085a3c9e292 -r 68f0c6c3b1d3 initfs/etc/busybox.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/initfs/etc/busybox.conf Mon Mar 06 16:42:57 2017 +0100 @@ -0,0 +1,12 @@ +# /etc/busybox.conf: SliTaz GNU/linux Busybox configuration. +# + +[SUID] +# Allow command to be run by anyone. +su = ssx root.root +passwd = ssx root.root +loadkmap = ssx root.root +mount = ssx root.root +reboot = ssx root.root +halt = ssx root.root +poweroff = ssx root.root diff -r 3085a3c9e292 -r 68f0c6c3b1d3 initfs/etc/fstab --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/initfs/etc/fstab Mon Mar 06 16:42:57 2017 +0100 @@ -0,0 +1,8 @@ +# /etc/fstab: information about static file system. +# +proc /proc proc defaults 0 0 +sysfs /sys sysfs defaults 0 0 +devpts /dev/pts devpts defaults 0 0 +tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /run tmpfs defaults 0 0 + diff -r 3085a3c9e292 -r 68f0c6c3b1d3 initfs/etc/httpd.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/initfs/etc/httpd.conf Mon Mar 06 16:42:57 2017 +0100 @@ -0,0 +1,36 @@ +# /etc/httpd.conf: Seb-OS Busybox HTTP web server configuration file. + +# Server root. +H:/var/www + +# Allow address. +A:192.168. + +# File to open by default. +I:index.html + +# Path to the 404 error page. +E404:/var/www/404.html + +# Require user root on urls starting with /adm/. use passwd system db +/adm:root:* + +# Reverse proxy. +#P:/url:[http://]hostname[:port]/new/path + +# CGI interpreter path. +*.sh:/bin/sh +*.cgi:/bin/sh +#*.py:/usr/bin/python +#*.php:/usr/bin/php-cgi + +# MIME type. +.txt:text/plain +.css:text/css +.xml:text/xml +.png:image/png +.jpg:image/jpeg +.tgz:application/x-tgz +.tar.gz:application/x-tgz +.tazpkg:application/x-tazpkg +.sup:application/x-sup diff -r 3085a3c9e292 -r 68f0c6c3b1d3 initfs/etc/init.d/rcS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/initfs/etc/init.d/rcS Mon Mar 06 16:42:57 2017 +0100 @@ -0,0 +1,39 @@ +#! /bin/sh +# +# Main boot script for your SliTaz Embedded System +# +. /lib/libseb.sh +. /etc/seb.conf + +colorize 33 "Processing /etc/init.d/rcS..." + +# Mount filesystems +echo "Mounting filesystems..." +/bin/mount proc +/bin/mount -a + +# Populate /dev + config hotplug +echo "Population /dev and config hotplug helper..." +/bin/touch /dev/mdev.log; /sbin/mdev -s +echo "/sbin/mdev" >/proc/sys/kernel/hotplug + +# Mount vdisk in Qemu or vdisk=/dev/sdb1:/path/to/seb-home.img +if blkid | fgrep -q "SebOShome"; then + colorize 036 "Mounting seb OS virtual disk on: /home" + mount /dev/sda /home +fi + +# Hostname +echo "Setting hostname to: $(colorize 033 $host_name)" +/bin/hostname ${host_name} + +# Networking +/sbin/ifconfig lo 127.0.0.1 up + +# Load dumped keymap +echo "Loading keyboard map..." +/sbin/loadkmap < /usr/share/kmap/default + +echo "" +colorize 035 "Welcome to SliTaz Embedded System" +boldify "Login: root" diff -r 3085a3c9e292 -r 68f0c6c3b1d3 initfs/etc/inittab --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/initfs/etc/inittab Mon Mar 06 16:42:57 2017 +0100 @@ -0,0 +1,11 @@ +# /etc/inittab: init configuration for SliTaz GNU/Linux. + +::sysinit:/etc/init.d/rcS + +# getty respawn shell invocations for selected ttys +tty1::respawn:/sbin/getty 38400 tty1 +tty2::askfirst:-/bin/sh + +::ctrlaltdel:/bin/umount -a -r +::ctrlaltdel:/sbin/reboot + diff -r 3085a3c9e292 -r 68f0c6c3b1d3 initfs/etc/profile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/initfs/etc/profile Mon Mar 06 16:42:57 2017 +0100 @@ -0,0 +1,13 @@ +# /etc/profile: system-wide config for the Bourne shells + +PATH="/usr/sbin:/usr/bin:/sbin:/bin:$HOME/.local/bin" +LD_LIBRARY_PATH="/usr/lib:/lib" + +if [ $(id -u) -eq 0 ]; then + PS1='\e[1m\u@\h:\w\#\e[m ' +else + PS1='\e[1m\u@\h:\w\$\e[m ' +fi + +export PATH LD_LIBRARY_PATH PS1 ignoreeof +umask 022 diff -r 3085a3c9e292 -r 68f0c6c3b1d3 initfs/etc/seb.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/initfs/etc/seb.conf Mon Mar 06 16:42:57 2017 +0100 @@ -0,0 +1,14 @@ +# /etc/seb-os.conf: SliTaz Embedded OS main configuration file +# + +# Hostame +host_name="seb" + +# Network interface +network_interface="eth0" + +# Boot time scripts +run_scripts="" + +# Daemons to start at boot +run_daemons="" diff -r 3085a3c9e292 -r 68f0c6c3b1d3 initfs/var/www/cgi-bin/index.cgi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/initfs/var/www/cgi-bin/index.cgi Mon Mar 06 16:42:57 2017 +0100 @@ -0,0 +1,7 @@ +#!/bin/sh +. /usr/lib/slitaz/httphelper.sh +header "Content-Type: text/plain" + +echo "Hello World!" + +exit 0 diff -r 3085a3c9e292 -r 68f0c6c3b1d3 initfs/var/www/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/initfs/var/www/index.html Mon Mar 06 16:42:57 2017 +0100 @@ -0,0 +1,11 @@ + + + + + Seb-OS Server + + +

Seb-OS Server

+

File: /index.html

+ +