summaryrefslogtreecommitdiffstats
path: root/minikrebs/profiles
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2013-01-31 19:41:11 +0100
committerlassulus <lassulus@googlemail.com>2013-01-31 19:41:11 +0100
commit5f8f9ea9e5f10abcef9c12d48345c098dca78199 (patch)
treec4dd748d5c152445569d7dfd2d0877ef66a95daa /minikrebs/profiles
parent7c050acc2559c622b831d9193e2336c15f42de6d (diff)
parent9461f6ece9f674588327c6dc3199fc0d7618ac48 (diff)
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'minikrebs/profiles')
-rwxr-xr-x[-rw-r--r--]minikrebs/profiles/init_overlay20
l---------minikrebs/profiles/instakrebs/customfiles/etc/rc.d/tinc1
-rwxr-xr-xminikrebs/profiles/nfc-login/customfiles/usr/bin/login-manager14
-rwxr-xr-xminikrebs/profiles/nfc-login/customfiles/usr/bin/mrled4
4 files changed, 27 insertions, 12 deletions
diff --git a/minikrebs/profiles/init_overlay b/minikrebs/profiles/init_overlay
index 3b714c39..e71cd151 100644..100755
--- a/minikrebs/profiles/init_overlay
+++ b/minikrebs/profiles/init_overlay
@@ -1,10 +1,22 @@
-#!/bin/sh
+#!/bin/bash
+cd $(dirname $(readlink -f $0))
[ ! -e overlay/ ] && echo "profile data for external overlay does not exist, bailing out"
-[ ! -e doc/overlay ] && echo "Profile demands the following partitioning of the overlay usb stick:" && cat doc/overlay
+[ -e doc/overlay ] && echo "Profile demands the following partitioning of the overlay usb stick:" && cat doc/OVERLAY
if grep -q $PWD/mnt/overlay /etc/mtab;then
-
+ echo "overlay mounted"
+ echo "copying overlay data:"
+ find overlay/ -mindepth 1 -maxdepth 1 | while read data; do
+ echo " $data -> mnt/overlay/$(basename $data)"
+ rm -rf mnt/overlay/$(basename $data)
+ cp -r $data mnt/overlay
+ done
+ echo
+ echo "unmounting overlay"
+ umount mnt/overlay/
else
- echo "please mount your overlay to $PWD/overlay"
+ mkdir -p $PWD/mnt/overlay
+ echo "please mount your overlay to $PWD/mnt/overlay"
fi
+
diff --git a/minikrebs/profiles/instakrebs/customfiles/etc/rc.d/tinc b/minikrebs/profiles/instakrebs/customfiles/etc/rc.d/tinc
deleted file mode 120000
index f08fe11d..00000000
--- a/minikrebs/profiles/instakrebs/customfiles/etc/rc.d/tinc
+++ /dev/null
@@ -1 +0,0 @@
-../init.d/tinc \ No newline at end of file
diff --git a/minikrebs/profiles/nfc-login/customfiles/usr/bin/login-manager b/minikrebs/profiles/nfc-login/customfiles/usr/bin/login-manager
index 63f35c74..f22a209e 100755
--- a/minikrebs/profiles/nfc-login/customfiles/usr/bin/login-manager
+++ b/minikrebs/profiles/nfc-login/customfiles/usr/bin/login-manager
@@ -1,18 +1,18 @@
#!/bin/sh
-#!/bin/sh
#LOGIN_HOST=heidi.shack
#LOGIN_HOST=heidi:5000
LOGIN_HOST=10.42.10.38:5000
all_led(){
- for i in 3g wlan lan wps;do
- led $i $1
- done
+ for i in 3g wlan lan wps;do
+ led $i $1
+
+ done
}
led(){
- LED="$1"
- ACTION="$2"
- echo $ACTION > /sys/class/leds/tp-link:green:$LED/trigger
+ /usr/bin/mrled $1 $2
}
+
+# fix for mr3020 weirdness
while sleep 1; do
uid=$(nfc-list | grep UID | cut -d: -f 2 | sed 's/ //g')
if ! [ x"$uid" = x ];then
diff --git a/minikrebs/profiles/nfc-login/customfiles/usr/bin/mrled b/minikrebs/profiles/nfc-login/customfiles/usr/bin/mrled
new file mode 100755
index 00000000..7059edd1
--- /dev/null
+++ b/minikrebs/profiles/nfc-login/customfiles/usr/bin/mrled
@@ -0,0 +1,4 @@
+#!/bin/sh
+LED="$1"
+ACTION="$2"
+echo $ACTION > /sys/class/leds/tp-link:green:$LED/trigger