Revision 24ccea7e102de8cbc93ab3befb123bbd18532be9 authored by Linus Torvalds on 08 November 2018, 23:55:01 UTC, committed by Linus Torvalds on 08 November 2018, 23:55:01 UTC
Pull xfs fixes from Darrick Wong:

 - fix incorrect dropping of error code from bmap

 - print buffer offsets instead of useless hashed pointers when dumping
   corrupt metadata

 - fix integer overflow in attribute verifier

* tag 'xfs-4.20-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: fix overflow in xfs_attr3_leaf_verify
  xfs: print buffer offsets when dumping corrupt buffers
  xfs: Fix error code in 'xfs_ioc_getbmap()'
2 parent s 6a1ac56 + 837514f
Raw File
hv_get_dhcp_info.sh
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0

# This example script retrieves the DHCP state of a given interface.
# In the interest of keeping the KVP daemon code free of distro specific
# information; the kvp daemon code invokes this external script to gather
# DHCP setting for the specific interface.
#
# Input: Name of the interface
#
# Output: The script prints the string "Enabled" to stdout to indicate
#	that DHCP is enabled on the interface. If DHCP is not enabled,
#	the script prints the string "Disabled" to stdout.
#
# Each Distro is expected to implement this script in a distro specific
# fashion. For instance on Distros that ship with Network Manager enabled,
# this script can be based on the Network Manager APIs for retrieving DHCP
# information.

if_file="/etc/sysconfig/network-scripts/ifcfg-"$1

dhcp=$(grep "dhcp" $if_file 2>/dev/null)

if [ "$dhcp" != "" ];
then
echo "Enabled"
else
echo "Disabled"
fi
back to top