Re: Problem with Cable Moden & Router.
- From: ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin)
- Date: Sun, 07 Jan 2007 16:29:03 -0600
On Sat, 06 Jan 2007, in the Usenet newsgroup comp.os.linux.misc, in article
<slrneq0i41.ab9.BitTwister@xxxxxxxxxxxxxxx>, Bit Twister wrote:
Moe Trin wrote:
Bad Bit Twister. Bad! No Biscuit!!!
Auh, frap. How embarrassing. <blush>
Happens all the time. That's why I try to use cut-and-pastes in a vain
effort to avoid typos. Sometimes it even works.
Nothing like having two editors working on the same file
and only getting the last updates saved. :(
That's why I like some of the modern editors that create a backup before
editing, and ask "Excuse me" when a second instance finds a backup with
the same name. It also helps when your desktop has
[compton ~]$ ps aux | grep -c nxterm
20
[compton ~]$
twenty terminals open.
That handles 90 percent of the distributions - the others use
/etc/*version (such as /etc/debian-version), or lack the file entirely.
Ubuntu has a 'debian-version' file, but it only mentions the Debian
version it was derived from. A more useful _command_ is 'lsb_release -a'
(assuming the distribution is LSB v2.0 compliant). You may wish to add
that.
Done
I should point out that 'cat /etc/*version' isn't going to be very useful
in your script, because distributions that use that file stash their
network configurations in different locations. Heck, even those using
/etc/*release play hide-and-seek with the data.
I take it the reason you want 'su - ' or a root login is the $PATH. It
was always beaten into me that scripts run by a privileges user should
either explicitly set the PATH _or_ call all commands by their full name.
I hear where your comming from, but...
I have seen application location move around in the same distribution
in different releases so hardcoding location is out.
Setting the PATH to /sbin:/usr/sbin:/bin:/usr/bin should do the trick,
as there is little likelihood of the desired executables living elsewhere.
(I know, we're assuming they come as part of the distribution... sigh).
That snytax error was a down and diry quick fix for the OP's PATH
problem and I need to spend more time looking into that /feature/,
It does the job.
And, see if I can keep the working editor screen visible. :-(
I have six panes on the desktop, and tend to use specific ones for specific
tasks. This tends to ease the search.
I'm guessing that the only reason you even want to run it as root is a
permissions problem reading some configuration files in some of the more
paranoid distributions..
Those are starting to bite, but main reason is that mii-tool wants
direct access to nic.
I assume that 'ethtool' has the same problems.
Old guy
.
- Follow-Ups:
- Re: Problem with Cable Moden & Router.
- From: Bit Twister
- Re: Problem with Cable Moden & Router.
- References:
- Problem with Cable Moden & Router.
- From: Mark Healey
- Re: Problem with Cable Moden & Router.
- From: Bit Twister
- Re: Problem with Cable Moden & Router.
- From: Mark Healey
- Re: Problem with Cable Moden & Router.
- From: Bit Twister
- Re: Problem with Cable Moden & Router.
- From: Mark Healey
- Re: Problem with Cable Moden & Router.
- From: Bit Twister
- Re: Problem with Cable Moden & Router.
- From: Mark Healey
- Re: Problem with Cable Moden & Router.
- From: Bit Twister
- Re: Problem with Cable Moden & Router.
- From: Mark Healey
- Re: Problem with Cable Moden & Router.
- From: Bit Twister
- Re: Problem with Cable Moden & Router.
- From: Moe Trin
- Re: Problem with Cable Moden & Router.
- From: Bit Twister
- Problem with Cable Moden & Router.
- Prev by Date: Re: Problem with Cable Moden & Router.
- Next by Date: Re: wget, how do I download when links are to a php ...?
- Previous by thread: Re: Problem with Cable Moden & Router.
- Next by thread: Re: Problem with Cable Moden & Router.
- Index(es):
Relevant Pages
|