Page 28 of 30

Posted: Thu 12 Feb 2009, 10:35
by Dougal
PaulBx1 wrote:Anyway, you probably don't need a hundred copies of backup, do you? Last time I cleaned them out, there must have been a hundred copies in /etc. Take a look at that code I supplied to limit it to 4 copies. Seems like that should be enough.
The code introduced in November should limit it to just the last one (I think you need to delete the others manually...).

Posted: Thu 12 Feb 2009, 16:26
by PaulBx1
Did that get into 4.1.2? I recently deleted all the backups, and already have 11 new ones.

Posted: Fri 13 Feb 2009, 11:07
by Dougal
PaulBx1 wrote:Did that get into 4.1.2? I recently deleted all the backups, and already have 11 new ones.
It should have been, so either I missed one place where it creates a backup, or you have an old version of rc.network in your pup_save...

Posted: Sat 14 Feb 2009, 04:30
by PaulBx1
Huh, it turned out I did have one in /initrd/pup_rw/etc/rc.d; don't know why. However according to "diff" it was identical to the one in /initrd/pup_ro2/etc/rc.d. Anyway I renamed the one in the pupsave and rebooted. That didn't add any new resolv.conf's. We'll see...

/etc/resolv.conf

Posted: Sat 21 Feb 2009, 10:47
by gyro
How many backups of /etc/resolv.conf should be kept?
None.
Backups of /etc/resolv.conf are just a waste of space in a production environment.
This code should be commented out, in a release version.

When should /etc/resolv.conf be cleared?
Never.
An empty /etc/resolv.conf always produces a 99% useless network.
The Internet works on IP addresses not host names.
Before your machine can open a connection to a server, it needs to find the IP address of that server. It does this by sending a query to a nameserver. To find the IP address of a nameserver to query, it reads /etc/resolv.conf.
An /etc/resolv.conf containing a vaild but inappropriate nameserver IP address will most likely still produce a working network.
It's better to have an old /etc/resolv.conf than an empty /etc/resolv.conf.

When should /etc/resolv.conf be clobbered?
If, and only if, nameserver (DNS) IP addresses are provided.

When should DNS and Gateway be configured?
If, and only if, the up-stream/Internet interface is being statically configured?
Both of these entries should only be configured once on each machine.
The Gateway can only be configured if the network on which it exists has already been configured. So this might as well be done at the same time as this network, the up-stream network, is configured.
Might as well configure both the once only things at the same time.

When should an interface be statically configured?
If it's a down-stream interface.
Specify only the IP address and the netmask.

When should dhcp be used to configure an interface?
Always on the up-stream interface.
It not only gives the machine a valid IP address, it also defines the Gateway IP address, and clobbers /etc/resolv.conf with the DNS IP addresses given to it.
And, it automatically updates this information should it ever change.
This means that you can connect the machine to any network with a dhcp server (most do these days), and the network just works. Quite handy on a laptop.

But dhcp doesn't work?
If you are absolutely sure that there is only one Puppy machine active on your network, there could be a problem with the dhcp server.
Otherwise change the hostname of each Puppy machine to be unique, and try again. Some dhcp servers will not lease two IP addresses to the same hostname.
By default the hostname of every Puppy machine is "puppypc". Change this in both /etc/hostname and /etc/hosts, and reboot the machine.

gyro

Posted: Sun 22 Feb 2009, 03:41
by PaulBx1
I now have 10 backup copies of resolv.conf.

Posted: Mon 23 Feb 2009, 10:39
by Dougal
PaulBx1 wrote:I now have 10 backup copies of resolv.conf.
Well, for the life of me I can't figure out how they could accumulate: every time before moving it to the backup, it deletes all the old backups!

Anyway, I found a way to solve it once and for all: now it is copied to resolv.conf.old (rather than using the PID of the process running), so there can only be one backup...

See the parent post.

Posted: Sun 01 Mar 2009, 19:23
by hayagix
I'm having pretty good luck with network wizard with puplets using 2.6.27 and 2.6.28 kernels.

Ralink 2500usb linux drivers and wpa interact well.

The only glitch I have is having to edit /etc/network-wizard/wireless/wpa_profiles. I need to change "defaultpsk" to the necessary key "xxxxxxx".

Posted: Sun 01 Mar 2009, 23:47
by Dougal
hayagix wrote:I'm having pretty good luck with network wizard with puplets using 2.6.27 and 2.6.28 kernels.

Ralink 2500usb linux drivers and wpa interact well.

The only glitch I have is having to edit /etc/network-wizard/wireless/wpa_profiles. I need to change "defaultpsk" to the necessary key "xxxxxxx".
You mean the passphrase (or rather: the 64-char hex key) isn't substituted in there?

Posted: Mon 02 Mar 2009, 02:14
by hayagix
Yes. My passphrase. There is no 64-char hex key.


ctrl_interface=/var/run/wpa_supplicant
update_config=1

network={
ssid="PRT 2"
scan_ssid=1
psk="defaultpsk"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP

wireless profile -

TITLE="PRT_2"
WPA_DRV="wext"
WPA_TYPE=""
WPA_AP_SCAN="1"
ESSID="PRT 2"
NWID=""
KEY="tastycritters"
MODE="managed"
SECURE="open"
FREQ="2.437G"
CHANNEL="6"
AP_MAC="00:40:B3:W4:G5:7R"

When I exchange my "tastycritters" for "defaultpsk" I connect perfectly.

Posted: Mon 02 Mar 2009, 20:59
by Dougal
hayagix wrote:Yes. My passphrase. There is no 64-char hex key.


ctrl_interface=/var/run/wpa_supplicant
update_config=1

network={
ssid="PRT 2"
scan_ssid=1
psk="defaultpsk"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
This is strange... I just tested the code in the wizard and it should have replaced that line, just like it replaced the ssid line...
The one thing that seems odd about your profile is that you don't have a scan_ssid line at the top (it should be the second line, after ctrl_interface) -- that should also have been updated at the same time.
Are you using a non-English locale? Maybe that is somehow affecting sed...

Posted: Tue 03 Mar 2009, 01:01
by hayagix
Sorry. Might have pasted info from an older profile. There were two and I normally delete the extras. My locale is English.
I deleted all profiles and reran the wizard. ap_scan ssid is present.
Passphrase glich has not changed.
Thanks.

Posted: Tue 03 Mar 2009, 11:12
by Dougal
hayagix wrote:Sorry. Might have pasted info from an older profile. There were two and I normally delete the extras. My locale is English.
I deleted all profiles and reran the wizard. ap_scan ssid is present.
Passphrase glich has not changed.
Thanks.
Could you try doing this again while running the wizard from a terminal ("net-setup.sh -d")? Maybe it'll show some error that will shed some light on this...

Posted: Tue 03 Mar 2009, 16:56
by hayagix
# net-setup.sh -d
OK
PSK is |"tastycritters"
d2f21e85945b764d767df453ccc4fa14628de9bb5875586fd4eef84c29b1f8b7|
sed: -e expression #1, char 47: unterminated `s' command
PSK is |"tastycritters"
d2f21e85945b764d767df453ccc4fa14628de9bb5875586fd4eef84c29b1f8b7|
Configuring interface wlan0 to network PRT 2 with wpa_supplicant...
Waiting for connection...
EXIT="Ready"
aborted

cat: /tmp/wpa_status.txt: No such file or directory
rm: cannot remove `/tmp/wpa_status.txt': No such file or directory
OK
c4fa14628de9bb5875586fd4eef84c29b1f8b7|
Configuring interface wlan0 to network PRT 2 with wpa_supplicant...
Waiting for connection...
EXIT="Ready"
aborted

cat: /tmp/wpa_status.txt: No such file or directory
rm: cannot remove `/tmp/wpa_status.txt': No such file or directory
OK

Posted: Tue 03 Mar 2009, 22:04
by Dougal
hayagix wrote:PSK is |"tastycritters"
d2f21e85945b764d767df453ccc4fa14628de9bb5875586fd4eef84c29b1f8b7|
sed: -e expression #1, char 47: unterminated `s' command
Aha, that it the problem. i'll look and see why that happens.

Posted: Wed 04 Mar 2009, 11:50
by Dougal
hayagix wrote:PSK is |"tastycritters"
d2f21e85945b764d767df453ccc4fa14628de9bb5875586fd4eef84c29b1f8b7|
I think I found what caused that, but have no idea why it happened:
wpa_passphrase return a few lines, including:

Code: Select all

#psk="tastycritters"
psk=d2f21e85945b764d767df453ccc4fa14628de9bb5875586fd4eef84c29b1f8b7
so to get the psk, the wizard used grep "[^#]psk" -- which worked fine with my test scripts, but apparently in your case it didn't exclude the commented out line...

Try the new version and see if it fixes that problem.

Posted: Wed 04 Mar 2009, 16:19
by hayagix
March 3rd wizard works like a charm. Thanks.

# net-setup.sh -d
OK
PSK is |d2f21e85945b764d767cf453ccc4fa14628de9rr5875586fd4eef84c29b1f8b7|
PSK is |d2f21e85945b764d767cf453ccc4fa14628de9rr5875586fd4eef84c29b1f8b7|
Configuring interface wlan0 to network PRT 2 with wpa_supplicant...
Waiting for connection...
completed
EXIT="Ready"

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
dhcpcd: MAC address = 00:d0:51:t4:07:32
dhcpcd: your IP address = 10.2.2.81
#

improved network wizard

Posted: Thu 05 Mar 2009, 08:27
by 98clru
Took a while to get converted to .pet but since I did my asus 900a is keeping the network settings after shutdown. Haven't run into any problems yet, of course most of the functionality I didn't need as I already had functioning network but had to be reinitialized with each reboot.

The connection is not established any more quickly (actually think it's less quickly) than right clicking on connection then directing to autoconnect with wif / ethernet but as it is a single step now to reboot/start that makes it easy enough for my wife to use!

I lost my touchpad on the ssd install, fortunately kept the usb drive version but will try fresh install to ssd soon and report on wifi unless someone else beats me to it.

Thanx Dougal!

iwlagn mssing from network wizard DB

Posted: Sun 15 Mar 2009, 06:08
by sue
iwlagn and maybe iwl5100 is missing from the network wizard DB.

Re: iwlagn mssing from network wizard DB

Posted: Mon 16 Mar 2009, 10:40
by Dougal
sue wrote:iwlagn and maybe iwl5100 is missing from the network wizard DB.
Do you mean they're missing from the list of WPA supporting modules, or from the list of modules offered for you to load?

I've added them to the WPA whitelist, but the modules offered list is generated from /etc/networkmodules (or "ethernetmodules", I'm not sure), which is supposed to be updated by whoever compiles the kernel...