[arch-general] Set ip lan address /etc/environment
ralph at inputplus.co.uk
Wed May 30 12:17:26 UTC 2018
> Put file /etc/profile.d/ip.sh with the content:
> ip="$(ifconfig | grep -A 1 'eth0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 1)"
To debug this kind of thing, e.g. to see if it even runs, intersperse
tee(1)s to files that can be inspected afterwards.
ip="$(ifconfig | tee /tmp/d.ifc | grep -A 1 'eth0' | tail -1 | tee ...
> /etc/security/pam_env.conf :
> ip DEFAULT="" OVERRIDE="$(ifconfig | grep -A 1
I see nothing to suggest PAM supports sh's `$()' syntax, and wouldn't
expect it to.
More information about the arch-general