Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.linux.ubuntu > #197552
| From | Bit Twister <BitTwister@mouse-potato.com> |
|---|---|
| Newsgroups | alt.os.linux.ubuntu |
| Subject | Re: systemd was Re: nautilus not working/wireless not responding either |
| Date | 2017-11-01 01:36 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <slrnovi982.7ji.BitTwister@wb.home.test> (permalink) |
| References | (15 earlier) <f54h99Ffor4U1@mid.individual.net> <slrnouqc3d.jcr.BitTwister@wb.home.test> <f5c5g4F8u30U1@mid.individual.net> <slrnov4td9.tf7.BitTwister@wb.home.test> <f5siopF2o5eU1@mid.individual.net> |
On Tue, 31 Oct 2017 17:28:07 -0700, fred flintstone wrote:
>
> Shoot, bt, I want this to work, but I've not been able to get any output:
>
> # loop over the 4 possible prefixes: (empty), cur_, new_, old_
> for prefix in '' 'cur_' 'new_' 'old_'; do
> # loop over the DHCP variables passed to dhclient-script
> for basevar in reason interface medium alias_ip_address \
> ip_address host_name network_number subnet_mask \
> broadcast_address routers static_routes \
> rfc3442_classless_static_routes \
> domain_name domain_search domain_name_servers \
> netbios_name_servers netbios_scope \
> ntp_servers \
> ip6_address ip6_prefix ip6_prefixlen \
> dhcp6_domain_search dhcp6_name_servers ; do
Yep, same here, and those were the variables I was wanting access to
to be able to let your script decide what to do.
I spent some time trying to get access to the desired variables. but I
believe NetworkManager has a bug or two. The following is my latest
attempt with all the links I installed yet the majority were never
triggered.
-----8<-----8<-----8<-- dump_env.sh ---8<-----8<-----8<
#!/bin/bash
#*********************************************************************
#* dump_env.sh - Dump network environment vars
#*
#* Install:
#* save script in /var/local/dump_env.sh
#* chmod +x /var/local/dump_env.sh
#*
#* create links in every directory having to do with networking
#* where you want to see the environment variables
#* Example:
#*
#* ln -sf /var/local/dump_env.sh /etc/NetworkManager/dispatcher.d/no-wait.d/xx_dump_env.sh
#* ln -sf /var/local/dump_env.sh /etc/NetworkManager/dispatcher.d/pre-down.d/xx_dump_env.sh
#* ln -sf /var/local/dump_env.sh /etc/NetworkManager/dispatcher.d/pre-up.d/xx_dump_env.sh
#* ln -sf /var/local/dump_env.sh /etc/dhcp/dhclient-enter-hooks.d/xx_dump_env.sh
#* ln -sf /var/local/dump_env.sh /etc/dhcp/dhclient-exit-hooks.d/xx_dump_env.sh
#* ln -sf /var/local/dump_env.sh /etc/network/if-down.d/xx_dump_env.sh
#* ln -sf /var/local/dump_env.sh /etc/network/if-post-down.d/xx_dump_env.sh
#* ln -sf /var/local/dump_env.sh /etc/network/if-pre-up.d/xx_dump_env.sh
#* ln -sf /var/local/dump_env.sh /etc/network/if-up.d/xx_dump_env.sh
#* ln -sf /var/local/dump_env.sh /etc/network/interfaces.d/xx_dump_env.sh
#*
#* Bouncing the network should create /tmp/dump_env.sh_log.xxxx
#* Example:
#* nmcli networking off
#* nmcli networking on
#* service network-manager restart
#* cat /tmp/dump_env*
#*
#*********************************************************************
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
set -u
_app=dump_env.sh
_out_fn=/tmp/${_app}_log.$$
touch $_out_fn
chmod 666 $_out_fn
echo "exe: $0" >> $_out_fn
echo "cmd line args: $@" >> $_out_fn
date >> $_out_fn
env | sort >> $_out_fn
echo "------end $_out_fn ---------------" >> $_out_fn
exit 0
#***********************end dump_env.sh *******************************
Here were the results
$ while read -r line; do head -3 $line; echo "" ;done < <(ls -1 dump_env.sh_log*)
exe: /etc/NetworkManager/dispatcher.d/pre-down.d/xx_dump_env.sh
cmd line args: enp0s3 pre-down
Fri Oct 27 15:13:08 CDT 2017
exe: /etc/NetworkManager/dispatcher.d/pre-up.d/xx_dump_env.sh
cmd line args: enp0s3 pre-up
Fri Oct 27 15:13:13 CDT 2017
exe: /etc/NetworkManager/dispatcher.d/pre-up.d/xx_dump_env.sh
cmd line args: enp0s3 pre-up
Fri Oct 27 15:13:18 CDT 2017
exe: /etc/NetworkManager/dispatcher.d/pre-up.d/xx_dump_env.sh
cmd line args: enp0s3 pre-up
Fri Oct 27 17:07:04 CDT 2017
exe: /etc/NetworkManager/dispatcher.d/pre-up.d/xx_dump_env.sh
cmd line args: enp0s3 pre-up
Sun Oct 29 14:39:05 CDT 2017
As you can see, the great majority of the desired soft links were
never executed.
I had expected dispatcher.d/01ifupdown would have caused several
triggers to be fired up. You might want to Google
dispatcher.d/01ifupdown and check a few links to see how to get it to
execute.
I did find it interesting that a
nmcli network off
nmcli network on
gave me two dumps, but
servide network-manager restart
only got me one dump.
I suggest you will need to get someone who knows what is going on to
take a look into why none of the desired links are being executed.
I suggest posting the above on the ubuntu forum to see if someone can
help you getting the links to work, or access to the desired
variables.
Back to alt.os.linux.ubuntu | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
nautilus not working/wireless not responding either fred flintstone <fred@server.invalid> - 2017-09-24 12:36 -0700
Re: nautilus not working/wireless not responding either "Jonathan N. Little" <lws4art@gmail.com> - 2017-09-24 15:46 -0400
Re: nautilus not working/wireless not responding either fred flintstone <fred@server.invalid> - 2017-09-29 14:26 -0700
Re: nautilus not working/wireless not responding either fred flintstone <fred@server.invalid> - 2017-10-04 19:40 -0700
Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-10-05 05:03 +0000
Re: nautilus not working/wireless not responding either fred flintstone <fred@server.invalid> - 2017-10-07 15:49 -0700
Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-10-07 23:24 +0000
Re: systemd was Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-10-10 23:22 +0000
Re: systemd was Re: nautilus not working/wireless not responding either fred flintstone <fred@server.invalid> - 2017-10-10 20:32 -0700
Re: systemd was Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-10-11 04:52 +0000
Re: systemd was Re: nautilus not working/wireless not responding either Melzzzzz <Melzzzzz@zzzzz.com> - 2017-10-11 05:00 +0000
Re: systemd was Re: nautilus not working/wireless not responding either fred flintstone <fred@server.invalid> - 2017-10-12 16:09 -0700
Re: systemd was Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-10-13 03:06 +0000
Re: systemd was Re: nautilus not working/wireless not responding either "Jonathan N. Little" <lws4art@gmail.com> - 2017-10-13 00:33 -0400
Re: systemd was Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-10-13 05:00 +0000
Re: systemd was Re: nautilus not working/wireless not responding either "Jonathan N. Little" <lws4art@gmail.com> - 2017-10-13 09:31 -0400
Re: systemd was Re: nautilus not working/wireless not responding either "Jonathan N. Little" <lws4art@gmail.com> - 2017-10-13 09:32 -0400
Re: systemd was Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-10-13 14:19 +0000
Re: systemd was Re: nautilus not working/wireless not responding either Marek Novotny <marek.novotny@marspolar.com> - 2017-10-13 09:56 -0500
Re: systemd was Re: nautilus not working/wireless not responding either fred flintstone <fred@server.invalid> - 2017-10-22 14:35 -0700
Re: systemd was Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-10-22 23:57 +0000
Re: systemd was Re: nautilus not working/wireless not responding either fred flintstone <fred@server.invalid> - 2017-10-25 12:03 -0700
Re: systemd was Re: nautilus not working/wireless not responding either "Jonathan N. Little" <lws4art@gmail.com> - 2017-10-26 12:46 -0400
Re: systemd was Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-10-26 23:54 +0000
Re: systemd was Re: nautilus not working/wireless not responding either fred flintstone <fred@server.invalid> - 2017-10-31 17:28 -0700
Re: systemd was Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-11-01 01:36 +0000
Re: systemd was Re: nautilus not working/wireless not responding either fred flintstone <fred@server.invalid> - 2017-11-06 12:35 -0800
[OT] Re: systemd was Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-10-27 00:23 +0000
Re: systemd was Re: nautilus not working/wireless not responding either fred flintstone <fred@server.invalid> - 2017-10-25 16:13 -0700
Re: systemd was Re: nautilus not working/wireless not responding either "Jonathan N. Little" <lws4art@gmail.com> - 2017-10-13 11:42 -0400
Re: systemd was Re: nautilus not working/wireless not responding either "Jonathan N. Little" <lws4art@gmail.com> - 2017-10-13 11:45 -0400
Re: systemd was Re: nautilus not working/wireless not responding either fred flintstone <fred@server.invalid> - 2017-10-13 17:03 -0700
Re: systemd was Re: nautilus not working/wireless not responding either "Jonathan N. Little" <lws4art@gmail.com> - 2017-10-13 20:25 -0400
Re: systemd was Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-10-14 01:45 +0000
Re: systemd was Re: nautilus not working/wireless not responding either Mike Easter <MikeE@ster.invalid> - 2017-10-10 16:34 -0700
Re: systemd was Re: nautilus not working/wireless not responding either Mike Easter <MikeE@ster.invalid> - 2017-10-10 16:41 -0700
Re: nautilus not working/wireless not responding either Mike Easter <MikeE@ster.invalid> - 2017-10-11 10:28 -0700
[OT] Re: nautilus not working/wireless not responding either Bit Twister <BitTwister@mouse-potato.com> - 2017-10-11 17:50 +0000
csiph-web