diff options
author | toni <matzeton@googlemail.com> | 2016-09-12 22:19:21 +0200 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2016-09-12 22:19:21 +0200 |
commit | b8dbe6d96045bca500497dcd71a4db0e0b8a110e (patch) | |
tree | 52cc98a5eade17039cbbcb9690a7731ff2aa7ba0 | |
parent | 4dd19ec3a7b3fef8823f15f1386cd22889fd7e2f (diff) |
cflags + naskpass networking
-rwxr-xr-x | scripts/naskpass.initconf | 10 | ||||
-rwxr-xr-x | scripts/naskpass.pre | 27 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/Makefile.in | 2 |
4 files changed, 3 insertions, 38 deletions
diff --git a/scripts/naskpass.initconf b/scripts/naskpass.initconf index 63989a1..fa1f945 100755 --- a/scripts/naskpass.initconf +++ b/scripts/naskpass.initconf @@ -1,15 +1,5 @@ # initramfs naskpass config file -# maximum ip wait time in seconds -MAXWAIT=25 - # kernel printk path PRINTK=/proc/sys/kernel/printk OLDPRINTK=/tmp/naskpass.oldprintk - -# network options -# NASK_IP, NASK_MAC requires NASK_DEV ! -#NASK_DEV=eth0 -# commenting out the following line will force debian's `configure_network` routine -#NASK_IP=192.168.0.11 -#NASK_MAC=66:66:66:66:66:66 diff --git a/scripts/naskpass.pre b/scripts/naskpass.pre index 8b3ab0e..4eb6d3b 100755 --- a/scripts/naskpass.pre +++ b/scripts/naskpass.pre @@ -8,33 +8,8 @@ if [ "x${PRINTK}" != "x" ] && [ -r ${PRINTK} ] && [ -w ${PRINTK} ]; then cat ${PRINTK} >${OLDPRINTK} echo "0 0 0 0" >${PRINTK} fi -sleep 0.2 - -echo -n 'waiting for ip ' -CURWAIT=$MAXWAIT if [ -x /sbin/sshd ]; then - -if [ "x${NASK_DEV}" != "x" ] && [ "x${NASK_MAC}" != "x" ]; then - ifconfig ${NASK_DEV} hw ether ${NASK_MAC} -fi - -if [ "x${NASK_DEV}" != "x" ] && [ "x${NASK_IP}" != "x" ]; then - ifconfig ${NASK_DEV} ${NASK_IP} -else - [ -x /bin/ipconfig ] && configure_networking & -fi - -while ! $(ifconfig -a | grep -qoE 'inet addr:'); do - echo -n '.' - if [ $CURWAIT -le 0 ]; then - echo ' got no ip, continue anyway.' - break - fi - CURWAIT=$(expr $CURWAIT - 1) - sleep 0.5 -done -echo +[ -x /bin/ipconfig ] && configure_networking >/dev/null 2>/dev/null & /sbin/sshd fi - diff --git a/src/Makefile.am b/src/Makefile.am index ff19f79..202e7a2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,5 +5,5 @@ naskshell_SOURCES=shell/shell.c if DEBUG naskpass_CFLAGS=-O0 -g3 -DDEBUG else -naskpass_CFLAGS=-fPIC -fomit-frame-pointer -Os +naskpass_CFLAGS=-fPIC -fomit-frame-pointer -fexpensive-optimizations -Os endif diff --git a/src/Makefile.in b/src/Makefile.in index ee35034..4a5a4cf 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -276,7 +276,7 @@ top_srcdir = @top_srcdir@ naskpass_SOURCES = main.c log.c opt.c status.c ui_ani.c ui.c ui_input.c ui_ipc.c ui_txtwindow.c ui_statusbar.c ui_nask.c naskpass_check_SOURCES = check/check.c naskshell_SOURCES = shell/shell.c -@DEBUG_FALSE@naskpass_CFLAGS = -fPIC -fomit-frame-pointer -Os +@DEBUG_FALSE@naskpass_CFLAGS = -fPIC -fomit-frame-pointer -fexpensive-optimizations -Os @DEBUG_TRUE@naskpass_CFLAGS = -O0 -g3 -DDEBUG all: aconfig.h $(MAKE) $(AM_MAKEFLAGS) all-am |