The time now is Sun 19 May 2013, 03:57
All times are UTC - 4 |
| Author |
Message |
rcrsn51

Joined: 05 Sep 2006 Posts: 7743 Location: Stratford, Ontario
|
Posted: Tue 02 Aug 2011, 13:33 Post subject:
|
|
| gcmartin wrote: | | @Rcrsn51 seems focused merely on SAMBA, yet I have repeated said ROX as well. |
Let me make my point again. The current situation, where "puppypc" is used everywhere in the machine, works perfectly well. It only becomes an issue when you start changing the hostname. If a Samba or web server needs to broadcast a name, that name can be easily declared in its own configuration.
IMHO, there is no practical need to do anything else. Other than adhering to some conventional wisdom about hostnames, what is the advantage to changing the status quo?
|
|
Back to top
|
|
 |
gcmartin
Joined: 14 Oct 2005 Posts: 2623 Location: Earth
|
Posted: Tue 02 Aug 2011, 13:38 Post subject:
|
|
As we are progressing thru this discussion, I think it may be important to note the following;
Puppy has become (in my mind) a major OS. But its a little different in its implementation.
ALL other major OSes are geared toward HDD installation. Puppy has brought to the table a system which is RAM + LIve Media based. So how this hostname issue is handled from the major OS standpoint is a little different than how it may get addressed in PUPPYland
Microsoft, AIX, HPUX, RedHAT, Suse, Ubuntu, etc all ask at system installation time what the system name (HOSTNAME) is to be, then they set all appropriate fields accordingly. 01Micko+JamesBond has suggested options that this be set during Live media boot or at Live media shutdown. (Boot may be a preferred method with preservation at shutdown)
All magor OSes seem to have "hooked/hacked/made adjustments" in hostname processing so that when the hostname function is activated by the roor user to change the system's hostname, all of the sytem's fields are immediately updated accordingly. This is why we are engaged in this discussion. How should we get this OS, Puppy, to do this accordingly too.
So we, here, are talking about 2 issues. - The hostname command processing in Puppy
- the system fields affected by hostname command use.
Hope this helps
_________________ Get ACTIVE; Create Circles; Do those good things which benefit the people's needs!
We are all related ... Its time to show that we know this!
Google's Puppy Search Engine
|
|
Back to top
|
|
 |
gcmartin
Joined: 14 Oct 2005 Posts: 2623 Location: Earth
|
Posted: Tue 02 Aug 2011, 13:40 Post subject:
|
|
| rcrsn51 wrote: | | [ ... Other than adhering to some conventional wisdom about hostnames, what is the advantage to changing the status quo? | To be perfectly clear is to ignore this problem area? No disrespect, but, I hope this is not what you are advocating. Further, we are NOT changing status_quo. This thread is about a problem area in PUPPY. Not status-quo.
I have never subscribed to the "every man (application) for himself" in systems development. I have found it better to solve things that are good for everyone at the sytem level.
You are already aware of the ROX problem.
The advantage is "consistent system information" for all internal applications use. We do NOT have that today. We have inconsistent information in the system.
I have NOT suggested that this is a high priority problem in thet system operation will stop. ROX might not perform optimumly or some other application may read inconsistent information. But, It is not going to magically disappear. Its needs some of our attention.
Hope this helps
_________________ Get ACTIVE; Create Circles; Do those good things which benefit the people's needs!
We are all related ... Its time to show that we know this!
Google's Puppy Search Engine
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7743 Location: Stratford, Ontario
|
Posted: Tue 02 Aug 2011, 16:01 Post subject:
|
|
| gcmartin wrote: | | I have never subscribed to the "every man (application) for himself" in systems development. I have found it better to solve things that are good for everyone at the sytem level. |
And I subscribe to the philosophy that the simplest solution is usually the best. You want to change the identifier in several locations, requiring a bunch of code. I want to change the identifier in one location, requiring no additional code.
Both methods would get you effectively the same result.
|
|
Back to top
|
|
 |
gcmartin
Joined: 14 Oct 2005 Posts: 2623 Location: Earth
|
Posted: Tue 02 Aug 2011, 16:38 Post subject:
|
|
| rcrsn51 wrote: | | gcmartin wrote: | | I have never subscribed to the "every man (application) for himself" in systems development. I have found it better to solve things that are good for everyone at the sytem level. |
And I subscribe to the philosophy that the simplest solution is usually the best. You want to change the identifier in several locations, requiring a bunch of code. I want to change the identifier in one location, requiring no additional code.
Both methods would get you effectively the same result. | Then, I think my friend we agree that something should be done, effectively. Thanks for clarifying that.
Although, I still don't understand how you get something for nothing. Are you offering a fix for this that we missed. How can you fix the hostname command to bring the system files into consistency? Can you share how you would do this?
In the opening thread, I ask for consideration at the botton of that thread. Can you help with any of those 5 items?
Thanks in advance.
_________________ Get ACTIVE; Create Circles; Do those good things which benefit the people's needs!
We are all related ... Its time to show that we know this!
Google's Puppy Search Engine
|
|
Back to top
|
|
 |
gcmartin
Joined: 14 Oct 2005 Posts: 2623 Location: Earth
|
Posted: Tue 02 Aug 2011, 17:43 Post subject:
01Micko |
|
Starting with 01Micko's approach we would arrinve at desktop with a PC on the LAN that is unique. This would suffice for most newbies who would NOT take the time or effort to change the hostname from the defautl that may ve offered on screen to them.
It this is done on initial boot (pfix=ram) there could also be an option somewhere which would force/ask the booting user to enter/change a name for this booting PC. This would, I thnk address 90& of situations for having the system named and the user to know what the name of the booting PC is. As well, all system applications would have consistent information no matter which field they would use internally for their ooperation. Were this to be done, we would cover most situations of IDing the system hostname fields and would significantly reduce/negaate a need to use the hostname command once the system is at desktop.
This seems reasonable.
Does anyone see a problem with an approach like that?
_________________ Get ACTIVE; Create Circles; Do those good things which benefit the people's needs!
We are all related ... Its time to show that we know this!
Google's Puppy Search Engine
|
|
Back to top
|
|
 |
shinobar

Joined: 28 May 2009 Posts: 2250 Location: Japan
|
Posted: Wed 03 Aug 2011, 21:25 Post subject:
HOSTNAME problem |
|
To make hostname=HOSTNAME for ROX, we need to reboot PC after the hostname is changed.
Rebooting X is not enough because the script /usr/bin/xwin does not read /etc/profile at reboot.
I am not sure it causes problem, but i think there is a hint.
BTW, connecting tools for puppy should be improved to use the hostname provided from the DHCP service.
_________________ Multilingual Wary-511
Lucid Puppy Quickset edition
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
|
|
Back to top
|
|
 |
gcmartin
Joined: 14 Oct 2005 Posts: 2623 Location: Earth
|
Posted: Thu 04 Aug 2011, 05:03 Post subject:
Hint at HOSTNAME problem. One path to solution |
|
| shinobar wrote: | To make hostname=HOSTNAME for ROX, we need to reboot PC after the hostname is changed.
Rebooting X is not enough because the script /usr/bin/xwin does not read /etc/profile at reboot.
I am not sure it causes problem, but i think there is a hint.
BTW, connecting tools for puppy should be improved to use the hostname provided from the DHCP service. | Hi Shinobar. Thanks for helping.
Couple of points.
#1
All (most) consumer routers do NOT supply a hostname to a PC when issuing IP personality to the PC.
#2 - Is this a possible hint to a solution?
I did find something of interest, when running latest PUP268. - The system boots to FirstRun/Personalize Settings.
- I changed the hostname field from puppypc to Luci268-01
- I clicked OK to confirm
- System gave the normal restart desktop message
- I then selected SHUTDOWN > Exit to Prompt
- At the prompt, I typed logout
- at the next prompt, I typed xwin
- desktop restarted
- I clicked console icon on desktop, typed "echo $HOSTNAME" and was surprised to find that the hostname is updated by the system to Luci268-01.
This works on this Puppy by Playdayz. I am not sure how many other PUP distros this would work on.
I run a LIve media environment, and this is verifiable by anyone for Pup268. I am not sure how many other PUPs that use FirstRUN to go to desktop, but those PUP distros, who use Personalize Settings may also have the same benefit that its has with Playdayz's-01Micko's distro
Is this a hint to solution?
So, it seems that changes made in the Personalize Settings Utility MAY accomplish the job whenever it run IFF it can accomplish a logout and xwin when the hostname is changed. Can FirstRun be modified to do this when the hostname is changed?
This may be a solution that CAN be incorporated or modeled for all PUPs. If so,
_________________ Get ACTIVE; Create Circles; Do those good things which benefit the people's needs!
We are all related ... Its time to show that we know this!
Google's Puppy Search Engine
|
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 1757
|
Posted: Thu 04 Aug 2011, 13:24 Post subject:
|
|
Here's a good read about the what, how and why of hostname and domain names:
http://jblevins.org/notes/hostname
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Sat 06 Aug 2011, 22:51 Post subject:
|
|
Interesting read amigo. with that in mind here is what is going in my /etc/rc.d/rc.sysint file just after rc.update is run
| Code: | if [ "`cat /etc/hostname`" = "puppypc" ];then #110807
echo -n "Updating unique hostname..." >/dev/console
echo "puppypc${RANDOM}" > /etc/hostname
PUPHOSTNAME="`cat /etc/hostname`"
HOSTSFILEFIRST="`grep -w 'puppypc' /etc/hosts|sed 's% puppypc%%'`" #first line
HOSTSFILEREST="`grep -v 'puppypc' /etc/hosts`" #rest of file
echo "$HOSTSFILEFIRST $PUPHOSTNAME" > /etc/hosts
echo "$HOSTSFILEREST" >> /etc/hosts
status_func 0 #outputs a "done" msg
fi |
That won't upset the apple cart if the user has changed "localhost" and added addresses to /etc/hosts (though at the stage it's run that's extremely unlikely to have happened anyway, unless some one has done a remaster/rebuild)
EDIT: Works fine
| Code: | # cat /etc/hostname
puppypc9408
# cat /etc/hosts
127.0.0.1 localhost puppypc9408
192.168.1.1 pc2
192.168.1.2 pc3
192.168.1.3 pc4
# echo $HOSTNAME
puppypc9408
# uname -n
puppypc9408
# cat /proc/sys/kernel/hostname
puppypc9408
# sysctl kernel.hostname
kernel.hostname = puppypc9408 |
EDIT2: My hostname is persistent after a reboot.
I'll attach my /etc/rc.d/rc.sysinit, note, this is from latest woof
| Description |
to open: gunzip rc.sysinit.gz
|

Download |
| Filename |
rc.sysinit.gz |
| Filesize |
10.62 KB |
| Downloaded |
140 Time(s) |
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
gcmartin
Joined: 14 Oct 2005 Posts: 2623 Location: Earth
|
Posted: Sun 07 Aug 2011, 13:14 Post subject:
|
|
| 01micko wrote: | | ... here is ... /etc/rc.d/rc.sysint file just after rc.update is run ... That won't upset the apple cart if the user has changed "localhost" and added addresses to /etc/hosts (though at the stage it's run that's extremely unlikely to have happened anyway, unless some one has done a remaster/rebuild) ... hostname is persistent after a reboot. ... | This is well thought-thru, well structured, and well-presented here for understanding.
What 01Micko presents here, will work not only for Live media who are booting for the first-time, but also for startup tools similar to what @Shinobar's FirstRUN/Personalize Settings does for first-boot or for some subsequext use. It paves the way for any distro developer to use other desktop tools or applications that rely on consistent system information in this area.
Does anyone see any downsides? I don't see any at this time.
Help if you can. And Thanks again @01Micko for your level on LAN understanding and your OTB addressing this for all of us.
_________________ Get ACTIVE; Create Circles; Do those good things which benefit the people's needs!
We are all related ... Its time to show that we know this!
Google's Puppy Search Engine
|
|
Back to top
|
|
 |
sc0ttman

Joined: 16 Sep 2009 Posts: 2173 Location: UK
|
Posted: Sun 07 Aug 2011, 19:12 Post subject:
|
|
| 01micko wrote: | Interesting read amigo. with that in mind here is what is going in my /etc/rc.d/rc.sysint file just after rc.update is run
[code-removed]
EDIT2: My hostname is persistent after a reboot.
I'll attach my /etc/rc.d/rc.sysinit, note, this is from latest woof |
Doesn't his break pup-advert-blocker, each reboot?
If so, you can search for:
| Code: | | # pup-advert-blocker IPs below |
and
| Code: | | # pup-advert-blocker IPs above |
and keep everything between in it a variable, and put it back in the new hostname file.
_________________ Akita Linux, VLC-GTK, Pup Search, Pup File Search
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Sun 07 Aug 2011, 19:23 Post subject:
|
|
sc0ttman
The test is to see if the hostname is "puppypc". If anything else is found then that code block is skipped.
If pupadvert blocker is installed previously with a bunch of addresses the addresses are preserved. See the variable "HOSTSFILEREST"
Cheers
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
gcmartin
Joined: 14 Oct 2005 Posts: 2623 Location: Earth
|
Posted: Wed 10 Aug 2011, 10:44 Post subject:
LightHouse64 PUP is handling it correctly |
|
LightHOUSE64 PUP is running a "Modified" version of Personalize Settings on 64bit PCs.which does everything we are discussing in this thread.
As most of us know, Personalize Settings is becoming an user appealing startup utility for doing some very basic system needs on the Puppy desktop; instead of continually stopping during boot processing to ask users questions for system settings needs. This approach is practical as well as appealing while giving any user a Menu item that he can return to whenever needed to make some setting change.
I don't know what he's done as 64bit Linux "MAY" offer something 32bit does not, but, his Personalize Settings updates ALL known needs for hostname in the system when you click OK. This means that every field that a hostname change should address is being addressed, correctly, all within the running desktop!. Maybe he found something in Personalize Settings that handles this for all system fields-files that is overlooked in 32bit PC's use of Personalize Settings.
I am appealing to TazOC for some insights that could be applied in the 32bit community (or ALL PUPs, in general).
Hope this helps
 |
| Description |
64bit LightHouse64 |
| Filesize |
103.12 KB |
| Viewed |
717 Time(s) |

|
| Description |
ALL pertinent fields are accurate |
| Filesize |
32.15 KB |
| Viewed |
710 Time(s) |

|
_________________ Get ACTIVE; Create Circles; Do those good things which benefit the people's needs!
We are all related ... Its time to show that we know this!
Google's Puppy Search Engine
|
|
Back to top
|
|
 |
sc0ttman

Joined: 16 Sep 2009 Posts: 2173 Location: UK
|
Posted: Wed 10 Aug 2011, 17:00 Post subject:
|
|
| 01micko wrote: | sc0ttman
The test is to see if the hostname is "puppypc". If anything else is found then that code block is skipped.
If pupadvert blocker is installed previously with a bunch of addresses the addresses are preserved. See the variable "HOSTSFILEREST"
Cheers |
whoops, oh yeah, didn't read it correctly.. I'm gonna go ahead and add this..
_________________ Akita Linux, VLC-GTK, Pup Search, Pup File Search
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|