rescueOS/fs-overlay/etc/init.d/rcS

81 lines
1.9 KiB
Plaintext
Raw Normal View History

2013-03-23 22:22:34 +01:00
#!/bin/sh
EMULATOR=0
VERSION="1.1"
mount -n -t sysfs none /sys
2013-03-23 22:22:34 +01:00
mount -n -t proc none /proc
echo 200 > /sys/class/backlight/acx565akm/brightness
mount -n -t tmpfs -o size=64k,mode=0755 tmpfs /dev
2013-03-23 22:22:34 +01:00
mkdir /dev/pts
mount -n -t devpts devpts /dev/pts
mount -n -t tmpfs -o rw,noexec,nosuid,mode=0755 tmpfs /run
mount -n -t tmpfs -o rw,mode=0755 tmpfs /root/
mount -n -t tmpfs -o rw,nosuid,nodev tmpfs /tmp/
2013-03-23 22:22:34 +01:00
echo /sbin/mdev.sh > /proc/sys/kernel/hotplug
mdev -s
find /sys/devices/* -name modalias | while read module ; do
modprobe `cat $module` 2> /dev/null
done
hwclock -s
hostname -F /etc/hostname
modprobe leds-lp5523
/sbin/battery-watchdog &
#/rescueOS/charge21.bash > /run/batterylog &
clear
echo "Disclaimer: This system comes without any warranty. Use it at your own risk."
sleep 3
clear
echo "Welcome to N900 Rescue Initrd $VERSION"
2013-03-23 22:22:34 +01:00
echo
/sbin/loadkmap < /rescueOS/nokia-n900.kmap
for i in 2 3 7 8 ; do
echo 25 > /sys/class/leds/lp5523\:channel$i/brightness
done
autostart_script=`grep -q autostart /proc/cmdline && cat /proc/cmdline | sed -e 's/.*autostart=\(.*\)/\1/'`
if [ -n "$autostart_script" ] ; then
echo "Running $autostart_script"
$autostart_script
fi
touch /run/resolv.conf
echo "Starting telnetd..."
echo
echo "Useful information"
echo "=================="
echo "The root password is: rootme"
echo "Shortcuts:"
echo "mmr -> mount maemo root"
echo "ummr -> umount maemo root"
echo "enftp -> enable ftp (anon upload/download everywhere)"
echo "mse -> enable mass-storage mode"
echo "msd -> disable mass-storage mode"
2015-05-31 13:33:19 +02:00
echo "usbne -> enable usb networking"
echo "usbnd -> disable usb networking"
echo "chargebat -> start battery charging"
echo "Tab: Shift + Space"
2015-05-31 13:08:22 +02:00
echo "ESC: Fn (Arrow) + Ctrl"
echo
echo
#node mess
if [ -e /sys/block/mmcblk0 ] && [ -e /sys/block/mmcblk1 ] ; then
echo -n "1" > /run/internal_nodenr
else
echo -n "0" > /run/internal_nodenr
fi
2013-03-23 22:22:34 +01:00
if [ "$EMULATOR" = "1" ] ; then
udhcpc eth0
fi
#We are done.