aboutsummaryrefslogtreecommitdiff
path: root/scripts/naskpass.pre
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/naskpass.pre')
-rwxr-xr-xscripts/naskpass.pre21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/naskpass.pre b/scripts/naskpass.pre
new file mode 100755
index 0000000..8a2d25d
--- /dev/null
+++ b/scripts/naskpass.pre
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+
+. /etc/naskpass.conf
+
+
+echo -n 'waiting for ip ...'
+CURWAIT=$MAXWAIT
+
+if [ -x /sbin/dropbear ]; then
+while ! $(ifconfig -a | grep -oE 'inet addr:'); do
+ echo -n '.'
+ if [ $CURWAIT -le 0 ]; then
+ echo ' got no ip, continue anyway.'
+ break
+ fi
+ expr $CURWAIT - 1
+done
+fi
+
+dmesg -D