Re: Sl 7: where did the dhcp.leases file go?
On Sun, Jun 21, 2015 at 2:22 AM, ToddAndMargo wrote: > > Okay, I give up. What happened to > > /var/lib/dhcp/dhclient-eth0.leases ps ax | grep dhc | grep -v grep and the "-lf" file will show you the lease.
Re: systemctl disable vs mask question
On Tue, Jun 16, 2015 at 3:02 AM, David Sommerseth wrote: > On 16 June 2015 07:52:05 CEST, ToddAndMargo wrote: >> >> # systemctl disable firewalld.service > > This avoids the firewalld.service unit to be automatically started during > boot. The service may still be started using 'systemctl start ' or if a > service uses socket activation it will also start automatically. If a unit's disabled but not masked, it can also be started as dependency of another unit.
Re: sl7: how do I auto create ifcfg-eth0?
On Sun, Jun 21, 2015 at 12:49 AM, ToddAndMargo wrote: > Hi All, > > In SL7, how do I auto create /etc/sysconfig/network-scripts/ifcfg-eth0 > from what is defaulted in my system? They're now controlled more directly by NetworkManager and partly by systemd, under /var/lib/NetworkManager/. > I was told that system-config-network would do that, but I can > not find it. That tool went away with SL 7 and the upstream RHEL 7: Try 'nmtui', the new command line NEtworkManager tool. > I really don't feel like doing it by hand. Plus, I may alter > some of the defaults by accident. > > "ifup eth0" is annoyed with me. > > Many thanks, > -T > > # ifconfig eth0 > eth0: flags=4163 mtu 1500 > inet 192.168.255.170 netmask 255.255.255.0 broadcast > 192.168.255.255 > inet6 fe80::5054:ff:fe6f:1147 prefixlen 64 scopeid 0x20 > ether 52:54:00:6f:11:47 txqueuelen 1000 (Ethernet) > RX packets 25219 bytes 41394275 (39.4 MiB) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 20788 bytes 2880089 (2.7 MiB) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Re: systemctl disable vs mask question
On 06/21/2015 11:24 AM, Tom H wrote: On Tue, Jun 16, 2015 at 3:02 AM, David Sommerseth wrote: On 16 June 2015 07:52:05 CEST, ToddAndMargo wrote: # systemctl disable firewalld.service This avoids the firewalld.service unit to be automatically started during boot. The service may still be started using 'systemctl start ' or if a service uses socket activation it will also start automatically. If a unit's disabled but not masked, it can also be started as dependency of another unit. And that one I wrote down in my notes. Thank you!
Re: Sl 7: where did the dhcp.leases file go?
On 06/21/2015 11:22 AM, Tom H wrote: On Sun, Jun 21, 2015 at 2:22 AM, ToddAndMargo wrote: Okay, I give up. What happened to /var/lib/dhcp/dhclient-eth0.leases ps ax | grep dhc | grep -v grep and the "-lf" file will show you the lease. This is on SL6. I haven't got my Sl7 VM fired up yet. $ ps ax | grep dhc | awk -F "-lf " '{print $2}' | awk '{print $1}' /var/lib/dhclient/dhclient-eth1.leases Thank you! -T
Re: Sl 7: where did the dhcp.leases file go?
Square brackets around your searched for expression will allow you to remove a pipe (no need to grep -v grep): ps ax | egrep -e d[h]cp.'*\.lease' On Sun, Jun 21, 2015 at 4:28 PM, ToddAndMargo wrote: > On 06/21/2015 11:22 AM, Tom H wrote: > >> On Sun, Jun 21, 2015 at 2:22 AM, ToddAndMargo >> wrote: >> >>> >>> Okay, I give up. What happened to >>> >>> /var/lib/dhcp/dhclient-eth0.leases >>> >> >> ps ax | grep dhc | grep -v grep >> >> and the "-lf" file will show you the lease. >> >> > This is on SL6. I haven't got my Sl7 VM fired up yet. > > $ ps ax | grep dhc | awk -F "-lf " '{print $2}' | awk '{print $1}' > > /var/lib/dhclient/dhclient-eth1.leases > > > Thank you! > > -T > -- Miano, Steven M. http://stevenmiano.com
Re: Sl 7: where did the dhcp.leases file go?
On 06/21/2015 11:22 AM, Tom H wrote: On Sun, Jun 21, 2015 at 2:22 AM, ToddAndMargo wrote: Okay, I give up. What happened to /var/lib/dhcp/dhclient-eth0.leases ps ax | grep dhc | grep -v grep and the "-lf" file will show you the lease. Hi Tom, Ah Ha! This on SL7: $ ps ax | grep dhc | awk -F "-lf " '{print $2}' | awk '{print $1}' | grep lease /var/lib/NetworkManager/dhclient-43af4b20-79ba-4ca8-aa9f-c0cdec45e25f-eth0.lease Thank you for helping me with this! -T
Re: Sl 7: where did the dhcp.leases file go?
On 06/21/2015 03:35 PM, Steven Miano wrote: Square brackets around your searched for expression will allow you to remove a pipe (no need to grep -v grep): ps ax | egrep -e d[h]cp.'*\.lease' Hi Steve I see that is works, but don't not understand why. -T
Re: Sl 7: where did the dhcp.leases file go?
On 06/21/2015 05:59 PM, ToddAndMargo wrote: On 06/21/2015 11:22 AM, Tom H wrote: On Sun, Jun 21, 2015 at 2:22 AM, ToddAndMargo wrote: Okay, I give up. What happened to /var/lib/dhcp/dhclient-eth0.leases ps ax | grep dhc | grep -v grep and the "-lf" file will show you the lease. Hi Tom, Ah Ha! This on SL7: $ ps ax | grep dhc | awk -F "-lf " '{print $2}' | awk '{print $1}' | grep lease /var/lib/NetworkManager/dhclient-43af4b20-79ba-4ca8-aa9f-c0cdec45e25f-eth0.lease Thank you for helping me with this! -T Okay, now I am getting scary! $ grep dhcp-server-identifier $(ps ax | grep dhc | awk -F "-lf " '{print $2}' | awk '{print $1}' | grep lease) | sort -r | sed -n 1,1p | awk '{print $3}' | awk -F ";" '{print $1}' 192.168.255.10 -- ~~ Computers are like air conditioners. They malfunction when you open windows ~~
Re: Sl 7: where did the dhcp.leases file go?
On Sun, Jun 21, 2015 at 9:21 PM, ToddAndMargo wrote: > On 06/21/2015 03:35 PM, Steven Miano wrote: >> >> Square brackets around your searched for expression will allow you to >> remove a pipe (no need to grep -v grep): >> >> ps ax | egrep -e d[h]cp.'*\.lease' It's a hack. The grep stand won't show itself, because it won't match the regexp.
Re: systemctl disable vs mask question
Hi all, It seems similar to chkconfig --add xyz and chkconfig --del xyz where xyz is a service to be managed by chkconfig or not, in init process. Prosun Prodhan 09339192066(M) Registered Linux User # 318610 (LiCo : http://www.linuxcounter.net, formerly http://counter.li.org) Use Open Document Format. Try OpenOffice (http://www.openoffice.org) or LibreOffice (http://www.libreoffice.org) - Free Of Cost. [When you say, "I wrote a program that crashed Windows," people just stare at you blankly and say, "Hey, I got those with the system, for free." - Linus Torvalds] NOTICE: This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain malware - harmful to the system. The sender therefore does not accept liability for any errors or omissions in the contents/attachments of this message, which arise as a result of e-mail transmission. Please note that this is a PERSONAL mail-id and any views or opinions presented in this email are solely those of the author and do not necessarily represent those of any company. On Mon, Jun 22, 2015 at 1:54 AM, ToddAndMargo wrote: > On 06/21/2015 11:24 AM, Tom H wrote: > >> On Tue, Jun 16, 2015 at 3:02 AM, David Sommerseth >> wrote: >> >>> On 16 June 2015 07:52:05 CEST, ToddAndMargo >>> wrote: >>> # systemctl disable firewalld.service >>> >>> This avoids the firewalld.service unit to be automatically started >>> during boot. The service may still be started using 'systemctl start ' >>> or if a service uses socket activation it will also start automatically. >>> >> >> If a unit's disabled but not masked, it can also be started as >> dependency of another unit. >> >> > And that one I wrote down in my notes. Thank you! >
Re: sl7: how do I auto create ifcfg-eth0?
On 06/21/2015 12:18 PM, Nico Kadel-Garcia wrote: On Sun, Jun 21, 2015 at 12:49 AM, ToddAndMargo wrote: Hi All, In SL7, how do I auto create /etc/sysconfig/network-scripts/ifcfg-eth0 from what is defaulted in my system? They're now controlled more directly by NetworkManager and partly by systemd, under /var/lib/NetworkManager/. I was told that system-config-network would do that, but I can not find it. That tool went away with SL 7 and the upstream RHEL 7: Try 'nmtui', the new command line NEtworkManager tool. Thank you! I really don't feel like doing it by hand. Plus, I may alter some of the defaults by accident. "ifup eth0" is annoyed with me. Many thanks, -T # ifconfig eth0 eth0: flags=4163 mtu 1500 inet 192.168.255.170 netmask 255.255.255.0 broadcast 192.168.255.255 inet6 fe80::5054:ff:fe6f:1147 prefixlen 64 scopeid 0x20 ether 52:54:00:6f:11:47 txqueuelen 1000 (Ethernet) RX packets 25219 bytes 41394275 (39.4 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 20788 bytes 2880089 (2.7 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 -- ~~ Computers are like air conditioners. They malfunction when you open windows ~~