mirror of
https://github.com/bvanroll/college-pentesting.git
synced 2025-08-28 19:42:41 +00:00
65 lines
1.9 KiB
Bash
Executable File
65 lines
1.9 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
file_nvramd=/var/run/nvramd.pid
|
|
|
|
mount -a
|
|
mkdir -p /var/run
|
|
cat /etc_ro/motd
|
|
|
|
# generate Dev Node
|
|
# Linux 2.6 uses udev instead of devfs, we have to create static dev node by myself
|
|
###mounted=`mount | grep mdev | wc -l`
|
|
###if [ $mounted -eq 0 ]; then
|
|
###mount -t ramfs mdev /dev
|
|
###mkdir /dev/pts
|
|
###mount -t devpts devpts /dev/pts
|
|
mdev -s
|
|
###fi
|
|
|
|
###mknod /dev/spiS0 c 217 0
|
|
###mknod /dev/i2cM0 c 218 0
|
|
###mknod /dev/rdm0 c 254 0
|
|
###mknod /dev/flash0 c 200 0
|
|
###mknod /dev/swnat0 c 210 0
|
|
###mknod /dev/hwnat0 c 220 0
|
|
###mknod /dev/acl0 c 230 0
|
|
###mknod /dev/ac0 c 240 0
|
|
###mknod /dev/mtr0 c 250 0
|
|
###mknod /dev/gpio c 252 0
|
|
###mknod /dev/PCM c 233 0
|
|
###mknod /dev/I2S c 234 0
|
|
|
|
echo "# <device regex> <uid>:<gid> <octal permissions> [<@|$|*> <command>]" > /etc/mdev.conf
|
|
echo "# The special characters have the meaning:" >> /etc/mdev.conf
|
|
echo "# @ Run after creating the device." >> /etc/mdev.conf
|
|
echo "# $ Run before removing the device." >> /etc/mdev.conf
|
|
echo "# * Run both after creating and before removing the device." >> /etc/mdev.conf
|
|
echo "sd[a-z][1-9] 0:0 0660 */sbin/automount.sh \$MDEV" >> /etc/mdev.conf
|
|
echo "sd[a-z] 0:0 0660 */sbin/automount.sh \$MDEV" >> /etc/mdev.conf
|
|
|
|
#enable usb hot-plug feature
|
|
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
|
|
|
|
nvram_daemon &
|
|
#sleep 9 #change from 3 to 9 sec. -> wait prepareSSLKey() on nvram_daemon() when on f/w upgrade or factory reset case.
|
|
|
|
while [ 1 ]
|
|
do
|
|
if [ ! -e $file_nvramd ]; then
|
|
echo "wait nvram_daemon ..."
|
|
sleep 2
|
|
continue
|
|
fi
|
|
break
|
|
done
|
|
|
|
internet.sh
|
|
|
|
#for telnet debugging
|
|
#security issue - don't run telnetd here -- andy 2012-07-03
|
|
#telnetd
|
|
|
|
#for syslogd
|
|
mkdir -p /var/log
|
|
|