View previous topic :: View next topic |
Author |
Message |
CiccioPasticcio Member
Joined: 08 Mar 2009 Posts: 26
|
Posted: Sun Mar 15, 2009 12:06 am Post subject: Starting DHCPd server at boot, giving auto-net connect & |
|
|
1) First part:
How to start the DHCPd server from boot time?
I modified the rc.local since I have no rc.dhcpd in the /etc/rc.d/ directory
Is there any other better way to do it?
2) Second part:
How to configure auto-connection to multiple wireless networks (cycling til the first available one is found and connected)? Considering no multiple adapters, single wi-fi interface.
So that when the server is moved from home to office I don't have to reconfigure everything. Both connections use encryption and DHCP.
I saw something like "auto-net" parameter or daemon on the internet... but they say it is distribution dependent.
Can I use that with SMS and how (I mean, where to modify and where to put the networks configuration files)?
Thank you,
Max |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Sun Mar 15, 2009 12:49 pm Post subject: |
|
|
You can use alien's script here for rc.dhcp.
Use webmin to setup dhcp server if you are not familiar with /etc/dhcpd.conf.
The files you need to edit are /etc/rc.d/rc.wireless.conf, /etc/rc.d/rc.inte1.conf under wireless section.
Also you need to make /etc/rc.d/rc.wireless executable (chmod +x /etc/rc.d/rc.wireless)
If /etc/rc.d/rc.wireless it's not executed by default, place an entry in /etc/rc.d/rc.local.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Sun Mar 15, 2009 6:55 pm Post subject: |
|
|
CiccioPasticcio: I've struggled with Slackwares wireless config when it comes to security settings. However, I eventually did get it working.
I wanted cycling thru ap's as well so I installed 'wicd'. Works great but its not a SMS package but is Slackware package. |
|
Back to top |
|
CiccioPasticcio Member
Joined: 08 Mar 2009 Posts: 26
|
Posted: Sun Mar 15, 2009 7:10 pm Post subject: |
|
|
Thanks for your help.
For the DHCPd:
I managed with the DHCPd server and I think I understood now the way it boots up (the SMS I mean).
I saw in the rc.M that the rc.dhcpd scripts is not checked for execution so I added:
Code: | if [ -x /etc/rc.d/rc.dhcpd ]; then
echo "Starting the DHCPd Server"
. /etc/rc.d/rc.dhcpd start
fi |
to the rc.local in order to manage it as all other scripts are managed in rc.M.
For the wireless:
I read the configuration files rc.wireless.conf & rc.inet1.conf and the startup scripts rc.wireless & rc.inet1 but I can't find what I would need.
I will try to explain better.
If I use a script which sets up everything at boot time I will not catch the "changes" in the network when they happen after boot time.
At the office we have two wi-fi routers, one for normal operations and one for backup when the first one is in maintenance or when it is needed by the netadmin for specific purposes (testing or similar).
When one is disabled, our connections move to the other one (which has different ESSID and encryption and so on). When the main is back online, the backup router is set to sleep and our connections move back to the original status.
The "win" application does this authomatically. You can set the priority level of each connection and then (cycling) the best one is set up when available. I think everybody knows this behavior.
I would like something similar on the server, so I don't have to check if it is online also when the netadmin changes the available router.
I saw something like net-auto daemon but I can't find details about it.
Even just a link to start would be enough.
Thanks,
Max
PS While writing, I received the answer from baboo... thanks, will check that out! |
|
Back to top |
|
CiccioPasticcio Member
Joined: 08 Mar 2009 Posts: 26
|
Posted: Mon Mar 16, 2009 1:12 am Post subject: |
|
|
I saw the wicd package but I don't think it will work without a GUI... and it needs X. I didn't install that and therefore I can't use it by now.
Three solutions envisaged now...
> find an alternative daemon.
> put the kde from the extras and install this tool.
> find a confguration file from an installed system and change it to fit my network.
Could you paste the content of one of the configuration files in the "/var/lib/wicd/configurations/" after adding a network to the auto-connection list?
Any alternative suggestion?
Thanks,
Max |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Mar 16, 2009 7:04 am Post subject: |
|
|
WiCD page says "Once configured, will connect even if the X display does not start" I don't know if it has dependencies though to X.
Anyway you can try to boot SMS.Live.CD with kde addon install wicd package configure it and take the configs, as it will be hardware dependable probably.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
CiccioPasticcio Member
Joined: 08 Mar 2009 Posts: 26
|
Posted: Mon Mar 16, 2009 6:56 pm Post subject: |
|
|
That's a great idea!
Yes, developers of wicd told me that I can just copy and paste from another installation and adapt to my network.
I didn't think of the KDE lzm module for the live CD.
Will do it tonight and will tell you if it was ok.
After adding the lzm in the "modules" folder... what should I do with the new iso? Just save it or some kind of scripts must be applied first?
Thanks,
Max
PS As far as I understood... it (the daemon) requires "gtk" to run... will I find a package for it in the repository of SMS? |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Mar 16, 2009 7:51 pm Post subject: |
|
|
Place module in folder modules and rebuild the iso using the provided script.
SMS has
gtk+-1.2.10-i486-4
gtk+2-2.12.12-i486-1
You could find other gtk packages in slackware, slacky.eu linuxpackages.net e.t.c.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
CiccioPasticcio Member
Joined: 08 Mar 2009 Posts: 26
|
Posted: Tue Mar 17, 2009 7:01 pm Post subject: |
|
|
No way to make it work... I started live plus KDE lzm module... added:
gtk+-1.2.10-i486-4
gtk+2-2.12.12-i486-1
and it didn't work. Synce it is written in pyton... I tried adding also:
pygtk-2.12.1-i486-2
but nothing happened again.
It keeps telling me the same as before:
Code: | root@sms:~/Desktop# wicd-client
Traceback (most recent call last):
File "/usr/lib/wicd/wicd-client.py", line 40, in <module>
import gtk
ImportError: No module named gtk |
After adding also:
pygobject-2.15.4-i486-1.tgz
I get this:
Code: | root@sms:~/Desktop# wicd-client
Traceback (most recent call last):
File "/usr/lib/wicd/wicd-client.py", line 40, in <module>
import gtk
File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 48, in <module>
from gtk import _gtk
ImportError: /usr/lib/libgdk_pixbuf-2.0.so.0: undefined symbol: g_set_error_literal |
Any guess about what is missing?
Thanks,
Max |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Mar 17, 2009 7:53 pm Post subject: |
|
|
Have you try to compile your own wicd package?
gtk+ packages were already installed no need to install them, maybe that's the issue...
Reboot you livecd, install pygobject, pygtk install your own or precompiled wicd package from slackware site.
post your results....
There is a thread here also that might need attention.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
|
Back to top |
|
CiccioPasticcio Member
Joined: 08 Mar 2009 Posts: 26
|
Posted: Tue Mar 17, 2009 11:54 pm Post subject: |
|
|
I managed installing everything on the sms-live + kde lzm module.
The packages needed were:
>>> For the wicd (the daemon) to start:
pygobject-2.15.4-i486-1.tgz
>>> For the wicd-client (the GUI) to start:
pygtk-2.12.1-i486-2.tgz
pycairo-1.6.4-i486-1.tgz
Everything went fine after this and then I copied the files:
/etc/wicd/*.conf
into the headless system (adding the same packages as above).
Going to test them now for a while.
Thank you again for the help!
Bye,
Max
PS baboo, did you tried on a headless system or on a system with KDE?
Because the client is needed to make the daemon produce the configuration files. After that... if you want, you can forget about the GUI and use the *.conf to manage your connections. |
|
Back to top |
|
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Wed Mar 18, 2009 12:58 am Post subject: |
|
|
sorry: yes I had kde installed originally but then removed pkg. I run it from conf file.
Glad to hear you are up and welcome aboard. |
|
Back to top |
|
CiccioPasticcio Member
Joined: 08 Mar 2009 Posts: 26
|
Posted: Wed Mar 18, 2009 1:45 am Post subject: |
|
|
Thx for your suggestion about wicd!
Bye,
Max |
|
Back to top |
|
|