Re: Set ip lan address /etc/environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, May 31, 2018 at 10:44:25AM +0100, Ralph Corderoy wrote:
> Hi Maykel,
> 
> > I need define variable called ip with current ip address machine...
> > And when reboot machine, the variable ip always has ip address.
> 
> Yes, I think we all figured that bit out.  :-)
> But why;  what's going to be using that IP-address environment variable,
> and when?

Indeed. Is it for consumption of users whose shell you don't know? Is it for
scripts, like cron jobs?

In the former case, see what is in /etc/shells, and drop a script to
/etc/profile.d, one for each shell. But that will be for login shells. In the
latter case, I am afraid you need to define it each time...

Finally, a bit of a puzzle, what are you going to do when the network goes
down, i.e. should the variable be unset or updated? In other words, how certain
are you that the IP address remains unchanged throughout the machine uptime?

-- 
Leonid Isaev



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux