mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
initial commit - needs clean-up
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
This commit is contained in:
12
pandora/scripts/services.sh
Executable file
12
pandora/scripts/services.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# $1 = ip
|
||||
# $2 = inet
|
||||
# $3 = samba
|
||||
# $4 = web
|
||||
insmod net2272
|
||||
insmod g_ether
|
||||
ifconfig usb0 $1 netmask 255.255.255.0 up
|
||||
# route add default gw $defaultgw
|
||||
if [ $2 = "on" ]; then /etc/init.d/inet start; fi
|
||||
if [ $3 = "on" ]; then smbd; fi
|
||||
if [ $4 = "on" ]; then thttpd; fi
|
||||
11
pandora/scripts/usboff.sh
Executable file
11
pandora/scripts/usboff.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
export PATH=$PATH:/sbin
|
||||
rmmod g_file_storage
|
||||
rmmod net2272
|
||||
if [ $1 = "nand" ]; then
|
||||
mount /mnt/nand || mount -o remount,rw /mnt/nand
|
||||
elif [ $1 = "root" ]; then
|
||||
mount -o remount,rw /
|
||||
else
|
||||
mount /mnt/sd || mount -o remount,rw /mnt/sd
|
||||
fi
|
||||
15
pandora/scripts/usbon.sh
Executable file
15
pandora/scripts/usbon.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# $1 = sd|nand|root
|
||||
# defaults to sd (compatible with previous versions)
|
||||
export PATH=$PATH:/sbin
|
||||
modprobe net2272
|
||||
if [ $1 = "nand" ]; then
|
||||
umount /mnt/nand || mount -o remount,loop,ro /mnt/nand
|
||||
modprobe g_file_storage file=/dev/loop/7
|
||||
elif [ $1 = "root" ]; then
|
||||
mount -o remount,loop,ro /
|
||||
modprobe g_file_storage file=/dev/mtdblock/3
|
||||
else
|
||||
umount /mnt/sd || mount -o remount,loop,ro /mnt/sd
|
||||
modprobe g_file_storage file=/dev/mmcsd/disc0/disc
|
||||
fi
|
||||
Reference in New Issue
Block a user