Re: Problem with Cable Moden & Router.



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
.



Relevant Pages

  • Re: Distributing applications that use 3rd party modules
    ... I'm getting into Python now after years of Perl, ... Imagine that you've written a script that uses several libraries, ... Create a distribution setup script in the same directory. ...
    (comp.lang.python)
  • Re: Vulnerability and Patch-Management in Linux (and other Unix)
    ... RedHat offers "RedHat Network", but it costs a lot of money (and they ... OS distribution because of application software support requirements ... the above script runs on one system (my ...
    (Focus-Linux)
  • Re: what is the best way to determine system OS?
    ... If you watch a typical autoconf script, ... >knowing which features you're looking for, I can't say how you would ... >"better" distribution that you already support, ...
    (comp.lang.python)
  • Re: Script urgent
    ... objLog.Write strMail & vbCrLf ... Name and Distribution list. ... If you have multiple servers and need to automate use the script ... You will need to modify the line to enter your domain ...
    (microsoft.public.exchange.admin)
  • Re: choosing between ipcop and iptables
    ... I had never heard of ipcop before, ... of another distribution and continue using the other distribution. ... Iptables is part of any normal distribution. ... if both the distribution startup scripts and your script try ...
    (comp.os.linux.security)