Re: Script Test [OT]

2008-09-09 Thread Cameron Simpson
On 08Sep2008 21:04, Kevin J. Cummings [EMAIL PROTECTED] wrote: Alan Evans wrote: On Mon, Sep 8, 2008 at 6:40 AM, Steven Tardy [EMAIL PROTECTED] wrote: kwhiskerz wrote: man hostid On my Fedora 9... $ hostid Now I haven't bothered to check any other machines, but my initial

Re: Script Test [OT]

2008-09-09 Thread [EMAIL PROTECTED]
Cameron Simpson wrote: On 08Sep2008 21:04, Kevin J. Cummings [EMAIL PROTECTED] wrote: Alan Evans wrote: On Mon, Sep 8, 2008 at 6:40 AM, Steven Tardy [EMAIL PROTECTED] wrote: kwhiskerz wrote: man hostid On my Fedora 9... $ hostid Now I haven't bothered to check any other machines,

Re: Script Test [OT]

2008-09-09 Thread Ed Greshko
[EMAIL PROTECTED] wrote: Cameron Simpson wrote: On 08Sep2008 21:04, Kevin J. Cummings [EMAIL PROTECTED] wrote: Alan Evans wrote: On Mon, Sep 8, 2008 at 6:40 AM, Steven Tardy [EMAIL PROTECTED] wrote: kwhiskerz wrote: man hostid On my Fedora 9... $ hostid Now I haven't bothered

Re: Script Test [OT]

2008-09-09 Thread Ed Greshko
Ed Greshko wrote: [EMAIL PROTECTED] wrote: Cameron Simpson wrote: On 08Sep2008 21:04, Kevin J. Cummings [EMAIL PROTECTED] wrote: Alan Evans wrote: On Mon, Sep 8, 2008 at 6:40 AM, Steven Tardy [EMAIL PROTECTED] wrote: kwhiskerz wrote: man hostid

Re: Script Test [OT]

2008-09-09 Thread Bill Davidsen
Alan Evans wrote: On Mon, Sep 8, 2008 at 6:40 AM, Steven Tardy [EMAIL PROTECTED] wrote: kwhiskerz wrote: Is there a way a script can determine which computer it is running on and refuse to run if it is on the wrong computer? man hostid On my Fedora 9... $ hostid Now I haven't

Re: Script Test [OT]

2008-09-08 Thread Steven Tardy
kwhiskerz wrote: This is OT, but perhaps someone knows an answer. Is there a way a script can determine which computer it is running on and refuse to run if it is on the wrong computer? if [ some case ]; then run else don't run fi man hostid -- fedora-list mailing list

Re: Script Test [OT]

2008-09-08 Thread Alan Evans
On Mon, Sep 8, 2008 at 6:40 AM, Steven Tardy [EMAIL PROTECTED] wrote: kwhiskerz wrote: Is there a way a script can determine which computer it is running on and refuse to run if it is on the wrong computer? man hostid On my Fedora 9... $ hostid Now I haven't bothered to check any

Re: Script Test [OT]

2008-09-08 Thread Kevin J. Cummings
Alan Evans wrote: On Mon, Sep 8, 2008 at 6:40 AM, Steven Tardy [EMAIL PROTECTED] wrote: kwhiskerz wrote: Is there a way a script can determine which computer it is running on and refuse to run if it is on the wrong computer? man hostid On my Fedora 9... $ hostid Now I haven't

Script Test [OT]

2008-09-06 Thread kwhiskerz
This is OT, but perhaps someone knows an answer. Is there a way a script can determine which computer it is running on and refuse to run if it is on the wrong computer? if [ some case ]; then run else don't run fi -- fedora-list mailing list fedora-list@redhat.com To unsubscribe:

Re: Script Test [OT]

2008-09-06 Thread Luciano Rocha
On Sat, Sep 06, 2008 at 02:27:27AM -0600, kwhiskerz wrote: This is OT, but perhaps someone knows an answer. Is there a way a script can determine which computer it is running on and refuse to run if it is on the wrong computer? if [ some case ]; then if [ $(hostname -s) = puter ]; then

Re: Script Test [OT]

2008-09-06 Thread Dennis Kaptain
if [ some case ]; then if [ $(hostname -s) = puter ]; then echo running fi I'd check how the hostname command runs on your computer, See what happens on my F8 system: [EMAIL PROTECTED] ~]$ hostname confianza [EMAIL PROTECTED] ~]$ hostname -s localhost [EMAIL PROTECTED] ~]$ the -s

Re: Script Test [OT]

2008-09-06 Thread kwhiskerz
The problem is that both computers return hostname = localhost, so that won't work. IP address is not always possible, as the network might not be up, especially on the laptop. How would I check the HWaddress (MAC)? As ifconfig returns a whole list of things: 1.How can I isolate just

Re: Script Test [OT]

2008-09-06 Thread kwhiskerz
A suggestion I found on the net is to test for the value of md5sum /etc/passwd. Now, does this stay the same, even if a password is added or changed? Is it unique to a computer? And also, how do I isolate the number and strip off the space and /etc/passwd from the result? -- fedora-list

Re: Script Test [OT]

2008-09-06 Thread Patrick O'Callaghan
On Sat, 2008-09-06 at 11:54 -0600, kwhiskerz wrote: The problem is that both computers return hostname = localhost, so that won't work. IP address is not always possible, as the network might not be up, especially on the laptop. How would I check the HWaddress (MAC)? As ifconfig returns

Re: Script Test [OT]

2008-09-06 Thread Les Mikesell
kwhiskerz wrote: The problem is that both computers return hostname = localhost, so that won't work. IP address is not always possible, as the network might not be up, especially on the laptop. How would I check the HWaddress (MAC)? As ifconfig returns a whole list of things: 1.How can I

Re: Script Test [OT]

2008-09-06 Thread Cameron Simpson
On 06Sep2008 12:01, kwhiskerz [EMAIL PROTECTED] wrote: | A suggestion I found on the net is to test for the value of md5sum | /etc/passwd. That's horrible. Unreliable, etc. | Now, does this stay the same, even if a password is added or | changed? With shadow passwords, yes. But if someone:

Re: Script Test [OT]

2008-09-06 Thread kwhiskerz
I will see if I can make the HWaddr test work. Thanks, those are great suggestions. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: Script Test [OT]

2008-09-06 Thread Bill Davidsen
kwhiskerz wrote: The problem is that both computers return hostname = localhost, so that won't work. IP address is not always possible, as the network might not be up, especially on the laptop. How would I check the HWaddress (MAC)? As ifconfig returns a whole list of things: 1.How can I

Re: Script Test [OT]

2008-09-06 Thread kwhiskerz
Tried it on both computers. Works great! Neither will run the other's script. Fantastic! THANKS :-) -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines