Description: Update: * [nuts] added support for wildcard and regexp device names * [libnut*] switch to dynamic linked client library + added development lib * [qnut] made settings more "standardized" + added support for compile flag to be not compatible with old settings: QNUT_SETTINGS_NOCOMPAT * [qnut] changed scripting settings to more general device settings + device details cleanup + Former scripts witch were executed on device state change are substituted by command lists. In each list the user can now specify witch commands will be executed and each entry can either be a specific command or a directory with executables. * some gerenal polishing, cleanup and as always: bugfixes
What NUT does: * manages your network devices (dhcp with fallback, static, zeroconf); currently only supports IPv4 on Linux * executes admin and user defined scripts for each device state * manages your wireless connections (WPA supplicant) * supports multiple network configurations (environments) for each device * supports multiple ip-addresses (interfaces) for each environment
The idea behind: If you have different working places, for example at home and university you have to mount network shares etc. manualy. With NUT you don't have to do that anymore.
You can define environments that get selected by the server according to different statements. So far the following statements are supported: check for essid, check for ip, check for ip with mac-address. Those statements can be combined with boolean operators.
Every time an event occures, scripts are executed accordingly (like the /etc/network scripts in debian). The follwing events exist: device state change: deactivated, activated, carrier, unconfigured, up interface changes (admin only): ifup/ifdown,deactivated, activated, carrier, unconfigured, up
Requires: * Qt 4.x (>= 4.4.0 recommended) with D-Bus support * resolvconf * libnl (server): please use stable version 1.1 (from http://people.suug.ch/~tgr/libnl/) * libiw (client)
Consists of 6 Parts: * nuts: Server * libnutcommon: Library needed from server and client (static) * libnutclient: Client library (static) * libnutwireless: Client library for wpa_supplicant (static) * qnut: Graphical client * cnut: Console client
For some more general information have a look in this gentoo forum thread: http://forums.gentoo.org/viewtopic-t-631415.html
See the download section for a config example for nuts.
Gentoo related: Nut is also in the devnull overlay. To add it (using layman) do the following: # layman -f && layman -a devnull (Further instructions at http://devnull.core.ws/EbuildRepository) To get an tagged version, just rename the ebuild to net-misc/nut-"version" (i.e. net-misc/nut-0.5.0)
Known bugs: * a fallback timeout of less than 10 seconds does not work (you can specify a timeout of less than 10 seconds but it's going to be ignored and set to 10 seconds) * the new wlan stack isn't supported yet. Due to the almost non-existing compatibility between the old and new wlan stack, scanning for networks returns wrong results. All other wlan related things should work
Hi, i packed nut to rpm and installed it.
Copied
install -m 644 resources/nuts-dbus.conf /etc/dbus-1/system.d/
install -m 644 nuts/dispatch /etc/nuts/dispatch
install -m 644 nuts/events/all/* /etc/nuts/events/all/
install -m 644 nuts/nuts.config /etc/nuts/
When i started /usr/sbin/nuts from root, i get:
Trying to set watch dir to "/var/run"
Pid file name is "dbus.pid"
Filedescriptor for inotify is 23
Connected SocketNotifier for inotify
Set dbus pid to: -1
(Inotify) Setting up watches
Setup Pid file dir watch with 1
Device(eth1) gotCarrier
Set next environment 0
Interface_IPv4::start
Device(eth1) is up!
And than i started /usr/bin/qnut from root:
Trying to set watch dir to "/var/run"
Pid file name is "dbus.pid"
Enabling DBusMonitor
Filedescriptor for inotify is 11
Connected SocketNotifier for inotify
Set dbus pid to: -1
(Inotify) Setting up watches
Setup Pid file dir watch with 1
Enabled DBusMonitor
setInformation()
Placing getDeviceList Call
And nothing more.
"QNUT - Qt client for Network UTility Server (NUTS) (v0.5.3) started"
in qnut's log tab.
Fri Nov 27 17:25:50 2009
My nuts.config file:
device "eth1" {
static {
ip 192.168.1.2;
netmask 255.255.255.0;
gateway 192.168.1.1;
dns-server 78.138.135.10;
};
};
ADSL modem with router and i have private adress, and haven't public.
Yes. All works. But in spec file i used mkdir for making folders.And depend "ntpdate-debian" is not correct, because you should edit scriptfile, id you have other distro...
My specfile:
http://www.pastebin.org/58674
P.S I translated qnut into Russian. Can you take that translation?
Hi,
I put it in the bug tracker (https://redmine.stbuehler.de/issues/20) and we'll try to solve this soon.
We may need you're assistance though as it compiles on debian and gentoo.
Hi,
we're sorry, but we couldn't find a solution to your problem so far.
According to your compiler-output linking should work if you installed the correct library (libiw). The order of the linker flags are the same on our machines.
Which version of qt are using (though this shouldn't cause the problems)?
Wirelesstools, libwireless and libwireles-devel aren't corrupted?
I'm a maintainer from the chakra-project
Michal and I just finished a PKGBUILD for arch linux.
You can read our progress here:
http://chakra-project.org/bbs/viewtopic.php?id=765
I still dont get wlan working on my machine. With wicd it works. We patched your app a little to fit the arch way.
... hope it is just a missconfiguration.
Arch-People, can you test our PKGBUILDs I committed to AUR? Report back with any comment ....
Unfortunatelly we don't know archlinux.
According to the archlinux-wiki (http://wiki.archlinux.org/index.php/Arch_vs_Others#Arch_vs_Gentoo) you have to write a PKGBUILD script. You might use the gentoo ebuild as reference. Maybe there is some way to use the debian package.
I actually made NUT pkgbuilds and such. I will post them up on the forums in the pkgbuilds section a little bit later if the bug (assuming its a bug and not an error on my part) where the client can't find the server is resolved. I will test again soon and find out.
Blah. I can't be bothered patching this stuff anymore. Tbh I have no clue why I even did all of this, because I have no use for it whatsoever. The prior releases/gits I needed 2 small patches to compile and run properly (though as mentioned, I still had problems with qnut finding the server like a person above). The pkgbuild edited to remove said patches [for connectionmanager.cpp and common.h] on the assumption they were fixed now gives this on compiling:
macaddress.h:52: error: âsprintfâ was not declared in this scope
If you still want the files, I can still post them up.
On adding another minor patch to include stdio.h in macaddress.h, it compiles as expected.. however, same problem as the last version.
QNUT - Qt client for Network UTility Server (NUTS) (v0.5.0) started
Fri May 8 19:47:16 2009
Please start nuts. Starting idle mode
It IS bloody running! The process exists, and so does /var/run/daemons/nuts :p
Also, I'm not sure why it has 0.5.0 there, as it's certainly the 0.5.1 unless the link is lying and nut-0.5.1.tar.bz2 is 0.5.1.
Hi,
thanks for trying to create a pkgbuild.
Unfortunatelly we never encountered the problems you have. It compiles fine on 3 different debian pcs (amd64+i686) and on 2 different gentoo pcs (amd64+i686).
We can confirm that it works on at least 5 debian and 2 gentoo machines.
Have you tried running nuts in a console as well as qnut? nuts config files and dbus config files are put in the right place? qnut has sufficient rights (though it looks like as if nuts can't connect to dbus)?
Ratings & Comments
38 Comments
Hi, I just wondered, last entries from 2009 - is this project dead? I was thinking of giving it a go...
Hi, i packed nut to rpm and installed it. Copied install -m 644 resources/nuts-dbus.conf /etc/dbus-1/system.d/ install -m 644 nuts/dispatch /etc/nuts/dispatch install -m 644 nuts/events/all/* /etc/nuts/events/all/ install -m 644 nuts/nuts.config /etc/nuts/ When i started /usr/sbin/nuts from root, i get: Trying to set watch dir to "/var/run" Pid file name is "dbus.pid" Filedescriptor for inotify is 23 Connected SocketNotifier for inotify Set dbus pid to: -1 (Inotify) Setting up watches Setup Pid file dir watch with 1 Device(eth1) gotCarrier Set next environment 0 Interface_IPv4::start Device(eth1) is up! And than i started /usr/bin/qnut from root: Trying to set watch dir to "/var/run" Pid file name is "dbus.pid" Enabling DBusMonitor Filedescriptor for inotify is 11 Connected SocketNotifier for inotify Set dbus pid to: -1 (Inotify) Setting up watches Setup Pid file dir watch with 1 Enabled DBusMonitor setInformation() Placing getDeviceList Call And nothing more. "QNUT - Qt client for Network UTility Server (NUTS) (v0.5.3) started" in qnut's log tab. Fri Nov 27 17:25:50 2009 My nuts.config file: device "eth1" { static { ip 192.168.1.2; netmask 255.255.255.0; gateway 192.168.1.1; dns-server 78.138.135.10; }; }; ADSL modem with router and i have private adress, and haven't public.
(Inotify) Event occured (Inotify) Reading (Inotify) Read Resource temporarily unavailable 32 Filename is "utmp" Size: 4 (Inotify) modify file Watch file descriptor is 1 from event 1 (Inotify) Done processing event sometimes in nuts log
Oh, Sorry.My mistake... I didn't copy cnut.bash_completion to /etc/bash_completion.d/
Does it work? The gentoo ebuild may be of some help to install nut properly.
Yes. All works. But in spec file i used mkdir for making folders.And depend "ntpdate-debian" is not correct, because you should edit scriptfile, id you have other distro... My specfile: http://www.pastebin.org/58674 P.S I translated qnut into Russian. Can you take that translation?
http://www.pastebin.org/58686 corrected one line)
qmake-qt4 make ../libnutclient/libnutclient.so: undefined reference to `iw_init_event_stream' ../libnutclient/libnutclient.so: undefined reference to `iw_ether_ntop' ../libnutclient/libnutclient.so: undefined reference to `iw_print_stats' ../libnutclient/libnutclient.so: undefined reference to `iw_extract_event_stream' ../libnutclient/libnutclient.so: undefined reference to `iw_get_basic_config' ../libnutclient/libnutclient.so: undefined reference to `iw_freq2float' ../libnutclient/libnutclient.so: undefined reference to `iw_sockets_open' ../libnutclient/libnutclient.so: undefined reference to `iw_get_range_info' rpm -qa|grep libnl libnl-1.1-alt2.qa1 libnl-devel-1.1-alt2.qa1 rpm -qa|grep libNL libNL-1.68-alt1 libNL-devel-static-1.68-alt1 libNL-devel-1.68-alt1 rpm -qa|grep wireless-tools wireless-tools-29-alt8 rpm -qa|grep libwireless libwireless-29-alt8 libwireless-devel-29-alt8 Help please!(NUT version 0.5.3)
Hi, I put it in the bug tracker (https://redmine.stbuehler.de/issues/20) and we'll try to solve this soon. We may need you're assistance though as it compiles on debian and gentoo.
Hi, could you post the complete buildlog somewhere? (i.e. pastebin)
Hi, here you are! http://www.pastebin.org/54823
Hi, we're sorry, but we couldn't find a solution to your problem so far. According to your compiler-output linking should work if you installed the correct library (libiw). The order of the linker flags are the same on our machines. Which version of qt are using (though this shouldn't cause the problems)? Wirelesstools, libwireless and libwireles-devel aren't corrupted?
Hi, we think, we've fixed the problem. Please try to build the latest head. You also need to install openresolv.
Yes, thanks to you. Now it builds correctly.
My qt version is 4.5.3...I'm going to pack it to rpm in this week.
Gcc-4.1.1 complaints about sprintf not defined, followinf patch fixes (and is safe to add even with previous gcc..): --- libnutcommon/macaddress.h.orig 2009-09-23 19:36:03.000000000 +0200 +++ libnutcommon/macaddress.h 2009-09-23 19:36:17.000000000 +0200 @@ -4,6 +4,7 @@ #include <QString> #include <QDBusArgument> #include <QHash> +#include <stdio.h> extern "C" { #include <net/ethernet.h> }
I'm a maintainer from the chakra-project Michal and I just finished a PKGBUILD for arch linux. You can read our progress here: http://chakra-project.org/bbs/viewtopic.php?id=765 I still dont get wlan working on my machine. With wicd it works. We patched your app a little to fit the arch way. ... hope it is just a missconfiguration. Arch-People, can you test our PKGBUILDs I committed to AUR? Report back with any comment ....
I got it working. Check out our wiki: http://chakra-project.org/wiki/index.php/Get_NET_with_NUT
Nice. Thank you very much for your work. I will add a link to your page in the app description :)
How can I install NUT on Arch? Thanks
Unfortunatelly we don't know archlinux. According to the archlinux-wiki (http://wiki.archlinux.org/index.php/Arch_vs_Others#Arch_vs_Gentoo) you have to write a PKGBUILD script. You might use the gentoo ebuild as reference. Maybe there is some way to use the debian package.
I actually made NUT pkgbuilds and such. I will post them up on the forums in the pkgbuilds section a little bit later if the bug (assuming its a bug and not an error on my part) where the client can't find the server is resolved. I will test again soon and find out.
Blah. I can't be bothered patching this stuff anymore. Tbh I have no clue why I even did all of this, because I have no use for it whatsoever. The prior releases/gits I needed 2 small patches to compile and run properly (though as mentioned, I still had problems with qnut finding the server like a person above). The pkgbuild edited to remove said patches [for connectionmanager.cpp and common.h] on the assumption they were fixed now gives this on compiling: macaddress.h:52: error: âsprintfâ was not declared in this scope If you still want the files, I can still post them up.
On adding another minor patch to include stdio.h in macaddress.h, it compiles as expected.. however, same problem as the last version. QNUT - Qt client for Network UTility Server (NUTS) (v0.5.0) started Fri May 8 19:47:16 2009 Please start nuts. Starting idle mode It IS bloody running! The process exists, and so does /var/run/daemons/nuts :p Also, I'm not sure why it has 0.5.0 there, as it's certainly the 0.5.1 unless the link is lying and nut-0.5.1.tar.bz2 is 0.5.1.
Hi, thanks for trying to create a pkgbuild. Unfortunatelly we never encountered the problems you have. It compiles fine on 3 different debian pcs (amd64+i686) and on 2 different gentoo pcs (amd64+i686). We can confirm that it works on at least 5 debian and 2 gentoo machines. Have you tried running nuts in a console as well as qnut? nuts config files and dbus config files are put in the right place? qnut has sufficient rights (though it looks like as if nuts can't connect to dbus)?