rootfs cleanups - added fs/network init, syslogd, telnetd, serial console, dhcp client
This commit is contained in:
3
fs-add/etc/bashrc
Normal file
3
fs-add/etc/bashrc
Normal file
@@ -0,0 +1,3 @@
|
||||
# /etc/bashrc
|
||||
|
||||
test "$PS1" = "\\s-\\v\\\$ " && PS1="[\u@\h \W]\\$ "
|
41
fs-add/etc/init.d/dhcpc-event
Executable file
41
fs-add/etc/init.d/dhcpc-event
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
test -z "$1" && echo "Error: should be called from udhcpc" && exit 1
|
||||
|
||||
RESOLV_CONF="/etc/resolv.conf"
|
||||
test -n "$broadcast" && BROADCAST="broadcast $broadcast"
|
||||
test -n "$subnet" && NETMASK="netmask $subnet"
|
||||
|
||||
case "$1" in
|
||||
deconfig)
|
||||
grep -q -v ip= /proc/cmdline
|
||||
if test $? -eq 0; then
|
||||
/sbin/ifconfig $interface up
|
||||
fi
|
||||
grep -q -v nfsroot= /proc/cmdline
|
||||
if test $? -eq 0; then
|
||||
/sbin/ifconfig $interface 0.0.0.0
|
||||
fi
|
||||
;;
|
||||
leasefail|nak)
|
||||
;;
|
||||
renew|bound)
|
||||
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
|
||||
if test -n "$router" ; then
|
||||
echo "deleting routers"
|
||||
while route del default gw 0.0.0.0 dev $interface ; do
|
||||
:
|
||||
done
|
||||
for i in $router ; do
|
||||
route add default gw $i dev $interface
|
||||
done
|
||||
fi
|
||||
echo -n > $RESOLV_CONF
|
||||
test -n "$domain" && echo "search $domain" >> $RESOLV_CONF
|
||||
for i in $dns ; do
|
||||
echo "adding dns $i"
|
||||
echo "nameserver $i" >> $RESOLV_CONF
|
||||
done
|
||||
;;
|
||||
esac
|
||||
exit 0
|
32
fs-add/etc/init.d/rcSBB
Executable file
32
fs-add/etc/init.d/rcSBB
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/busybox sh
|
||||
|
||||
busybox echo "Welcome to SATIP-AXE Linux!"
|
||||
|
||||
busybox mount -t proc proc /proc
|
||||
# remount root filesystem in rw mode
|
||||
busybox mount -o remount,rw /
|
||||
# Create all symbolic links.
|
||||
/bin/busybox --install -s
|
||||
|
||||
# mount /dev and devpts to allow logging in
|
||||
mount -t tmpfs -o size=64k,mode=0755 tmpfs /dev
|
||||
mkdir /dev/pts /dev/input
|
||||
mount -t devpts none /dev/pts -ogid=5,mode=620
|
||||
|
||||
# use mdev/sysfs
|
||||
mount -t sysfs sysfs /sys
|
||||
echo /sbin/mdev > /proc/sys/kernel/hotplug
|
||||
echo /sbin/hotplug > /proc/sys/kernel/hotplug
|
||||
mdev -s
|
||||
|
||||
# make /tmp as tmpfs
|
||||
mount -t tmpfs -o size=1M tmpfs /tmp
|
||||
|
||||
# start syslogd
|
||||
syslogd -C256
|
||||
|
||||
# basic network
|
||||
hostname satip-axe
|
||||
ifconfig lo 127.0.0.1 netmask 255.255.255.0
|
||||
ifconfig eth0 up
|
||||
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
|
13
fs-add/etc/inittabBB
Executable file
13
fs-add/etc/inittabBB
Executable file
@@ -0,0 +1,13 @@
|
||||
# Boot
|
||||
::sysinit:/etc/init.d/rcSBB
|
||||
# Console
|
||||
ttyAS0::askfirst:/bin/bash --init-file /etc/bashrc
|
||||
# DHCP Client
|
||||
::respawn:/sbin/udhcpc -f -S -p /tmp/udhcpc.pid -s /etc/init.d/dhcpc-event
|
||||
# telnetd
|
||||
::respawn:/usr/sbin/telnetd -F -l /bin/login
|
||||
# Others
|
||||
::ctrlaltdel:/sbin/reboot
|
||||
::shutdown:/sbin/swapoff -a
|
||||
::shutdown:/bin/umount -a -r
|
||||
::restart:/sbin/init
|
2
fs-add/etc/motd
Normal file
2
fs-add/etc/motd
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
Welcome to SATIP-AXE server
|
26
fs-add/etc/passwd
Normal file
26
fs-add/etc/passwd
Normal file
@@ -0,0 +1,26 @@
|
||||
root:KelgCamVIiREw:0:0:root:/root:/bin/sh
|
||||
bin:*:1:1:bin:/bin:
|
||||
daemon:*:2:2:daemon:/usr/sbin:
|
||||
sys:*:3:3:sys:/dev:
|
||||
adm:*:4:4:adm:/var/adm:
|
||||
lp:*:5:7:lp:/var/spool/lpd:
|
||||
sync:*:6:8:sync:/bin:/bin/sync
|
||||
shutdown:*:7:9:shutdown:/sbin:/sbin/shutdown
|
||||
halt:*:8:10:halt:/sbin:/sbin/halt
|
||||
mail:*:9:11:mail:/var/spool/mail:
|
||||
news:*:10:12:news:/var/spool/news:
|
||||
operator:*:12:0:operator:/root:
|
||||
games:*:13:100:games:/usr/games:
|
||||
ftp:*:15:14:ftp:/var/ftp:
|
||||
man:*:16:100:man:/var/cache/man:
|
||||
nobody:*:65534:65534:nobody:/home:/bin/sh
|
||||
dbus:*:81:81:System message bus:/:/sbin/nologin
|
||||
avahi:*:76:76:avahi:/var/lib/misc:/bin/false
|
||||
rpc:*:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin
|
||||
sshd:*:74:74:sshd:/var/empty/sshd:/bin/false
|
||||
ntp:*:38:38:ntp:/etc/ntp:/sbin/nologin
|
||||
httpd:*:75:75:httpd:/home/httpd:/bin/false
|
||||
dnsmasq:*:75:75:dnsmasq:/var/lib/misc:/bin/false
|
||||
rtpproxy:*:492:484:rtpproxy:/home/rtpproxy:/bin/false
|
||||
npd6:*:86:86:npd6 user:/:/sbin/nologin
|
||||
radvd:*:85:85:radvd user:/:/sbin/nologin
|
Reference in New Issue
Block a user