Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Did you tried to run the script manually first?. Does it gave any error?. May be the file does not have execute permissions? . You can show the content of interface file here
Yes it runs fine of I run it manually. It is set to +x.
Code:
#! /bin/sh
echo "sshcygnus0"
# Don't bother to restart sshd when lo is configured.
if [ "$IFACE" = lo ]; then
exit 0
fi
echo "sshcygnus0a"
# Only run from ifup.
if [ "$MODE" != start ]; then
exit 0
fi
echo "sshcygnus0b"
# We only care about inet and inet6. Get ye gone, strange people
# still using ipx.
if [ "$ADDRFAM" != inet ]; then
exit 0
fi
echo "sshcygnus0c"
# Is the bin there?
if [ ! -e /usr/local/bin/sshcygnus ]; then
exit 0
fi
echo "sshcygnus1"
sleep 6
exec /usr/local/bin/sshcygnus
echo "sshcygnus2"
echo "********* IFACE=$IFACE *********"
mount /media/hex
mount /media/droog
echo "sshcygnus3"
exit 0
sshcygnus is a script which sets up reverse SSH tunnels to remotely provide services to my other machines. hex and droog are remote share mounts through sshfs.
But here's a clue: Running from the command-line, it dumps out after sshcygnus0a. (Only run from ifup) It does run on boot, but not on wake from sleep or from the command-line.
So I comment out the ifup test, and then it dumps out after sshcygnus0b. (inet and inet6)
So I comment that out, and then it runs from the command-line.
Why would this be?
Last edited by Quantumstate; 04-14-2013 at 11:20 AM.
interface file means /etc/network/interfaces. Where you have defined if-up. Also long listing of script showing it is in correct directory with correct permissions. User root should also have execute permissions. Also look for /var/log/messages or /var/log/syslog for any clue about the issue.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
#********************************************************
# The primary network interface
# See /etc/wpa_supplicant/wpa_supplicant.conf
# See /usr/share/doc/wpa_supplicant, man wpa_supplicant and man interfaces
# If card not responding: ifdown wlan0 && ifconfig wlan0 down ifup wlan0
auto wlan0
iface wlan0 inet manual
# The file contains roaming information on all preferred networks
# to which wpa_supplicant will connect automatically.
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
# "home" is a keyword which is used in /etc/wpa_supplicant/wpa_supplicant.conf
# to tie this entry and a network definition in wpa_supplicant.conf
iface home inet static
pre-up /sbin/iwconfig wlan0 txpower 5
#pre-up /sbin/iwconfig wlan0 power saving 3
#pre-up ip link set wlan0 up
address 192.168.11.1
netmask 255.255.255.0
network 192.168.11.0
broadcast 192.168.11.255
gateway 192.168.11.5
up ip addr add 192.168.1.1/28 brd 192.168.1.255 dev wlan0 label wlan0:1
# Power-saving Mode
#iwconfig wlan0 min period 0
#iwconfig wlan0 max period 0
I've always edited this manually. NM is deinstalled. I have never been able to get this set up to be multi-homed. (for a Home profile and Any profile)
Wow, something went wrong with my logging on 27 Feb. All that's in messages is: 14 Apr 10:00:07 ntpdate[14069]: step time server 128.249.1.10 offset 0.016603 sec
syslog has been empty since 27 Feb.
Tracing this, it turns out that somehow /etc/init.d/rsyslog got pointed to an Upstart script. Well Upstart is busted in Debian, but there was an rsyslogd.dpkg-new file so I renamed that. Logging is running again. (-Thank- you, once again, Debian)
Last edited by Quantumstate; 04-15-2013 at 10:22 AM.
Putting the laptop to sleep and waking, results in hex and droog not mounted, and no reverse SSH tunnels set up by sshcygnus. Here is what's in messages. No mention of sshcygnus or share mounts in dmesg either.
Last edited by Quantumstate; 04-16-2013 at 09:51 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.