Imported sources from subversion.

This commit is contained in:
Ricardo Martins
2013-07-13 17:19:22 +01:00
commit 12d63d1569
455 changed files with 69857 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
#! /bin/sh
modem_vid='12d1'
modem_pid='1446'
while [ 1 ]; do
vid=$(grep "$modem_vid" /sys/bus/usb/devices/?-?*/idVendor)
pid=$(grep "$modem_pid" /sys/bus/usb/devices/?-?*/idProduct)
if [ -n "$vid" ] && [ -n "$pid" ]; then
/usr/bin/uswitch "$modem_vid" "$modem_pid"
fi
sleep 5
done

View File

@@ -0,0 +1,116 @@
#! /bin/sh
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
. /etc/config
if [ -z "$cfg_tmpfs_size" ]; then
cfg_tmpfs_size='2097152'
fi
if [ -z "$cfg_min_free_kbytes" ]; then
cfg_min_free_kbytes='8192'
fi
sysinit()
{
if [ -f /.reboot ]; then
mount -t proc proc /proc
mount -o remount,rw /
rm /.reboot
mount -o remount,ro /
reboot
return 0
fi
# Mount pseudo-filesystems.
mount -t sysfs sysfs /sys &&
mount -t proc proc /proc &&
mkdir /dev/shm /dev/pts &&
mount -t tmpfs -o size="$cfg_tmpfs_size" tmpfs /dev/shm &&
mount -t devpts devpts /dev/pts &&
# Register mdev as hotplug event handler.
echo >/dev/mdev.seq &&
echo /sbin/mdev > /proc/sys/kernel/hotplug &&
# Update ld cache, populate /dev.
# mount -o remount,rw / &&
/sbin/mdev -s &&
# /sbin/ldconfig &&
# mount -o remount,ro / &&
# Set minimum free kbytes.
echo "$cfg_min_free_kbytes" > /proc/sys/vm/min_free_kbytes &&
# Set hostname.
hostname "$cfg_hostname" &&
# Loopback device.
ifconfig lo 127.0.0.1 netmask 255.0.0.0 up &&
# Load modules.
modprobe -a $cfg_modules $cfg_modules1
# Start services.
for service in $cfg_services0 $cfg_services1 $cfg_services2; do
. /etc/rc.d/$service
start
done
}
syshalt()
{
if [ -f /.reboot ]; then
return 0
fi
srv=''
for s in $cfg_services0 $cfg_services1 $cfg_services2; do
srv="$s $srv"
done
for s in $srv; do
. /etc/rc.d/$s
stop
done
umount -r /dev/pts /dev/shm /sys / /proc
}
service()
{
. /etc/rc.d/"$1"
case "$2" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 4
start
;;
*)
echo "Usage: $0 <service> [start,stop,restart]"
exit 1
;;
esac
}
case "$1" in
sysinit)
sysinit
;;
syshalt)
syshalt
;;
*)
service "$1" "$2"
;;
esac

View File

@@ -0,0 +1,12 @@
#! /bin/sh
config='/etc/config'
if [ -f "$config" ]; then
source "$config"
echo "$cfg_glued_version"
exit 0
fi
echo "ERROR: failed to load '$config'."
exit 1