Commit 93912384 authored by Mike Frysinger's avatar Mike Frysinger

hostname: add a config knob to control build/install

parent fbc11bb9
......@@ -33,12 +33,15 @@ SBINDIR ?= /sbin
NET_LIB_PATH = lib
NET_LIB_NAME = net-tools
PROGS := ifconfig hostname netstat route slattach plipconfig nameif
PROGS := ifconfig netstat route slattach plipconfig nameif
-include config.make
ifeq ($(HAVE_ARP_TOOLS),1)
PROGS += arp rarp
endif
ifeq ($(HAVE_HOSTNAME_TOOLS),1)
PROGS += hostname
endif
ifeq ($(HAVE_IP_TOOLS),1)
PROGS += iptunnel ipmaddr
endif
......@@ -204,7 +207,6 @@ installbin:
@echo
install -m 0755 -d ${BASEDIR}${SBINDIR}
install -m 0755 -d ${BASEDIR}${BINDIR}
install -m 0755 hostname ${BASEDIR}${BINDIR}
install -m 0755 ifconfig ${BASEDIR}${BINDIR}
install -m 0755 nameif ${BASEDIR}${SBINDIR}
install -m 0755 netstat ${BASEDIR}${BINDIR}
......@@ -215,20 +217,25 @@ ifeq ($(HAVE_ARP_TOOLS),1)
install -m 0755 arp ${BASEDIR}${SBINDIR}
install -m 0755 rarp ${BASEDIR}${SBINDIR}
endif
ifeq ($(HAVE_IP_TOOLS),1)
install -m 0755 ipmaddr $(BASEDIR)${SBINDIR}
install -m 0755 iptunnel $(BASEDIR)${SBINDIR}
endif
ifeq ($(HAVE_MII),1)
install -m 0755 mii-tool $(BASEDIR)${SBINDIR}
endif
ifeq ($(HAVE_HOSTNAME_TOOLS),1)
install -m 0755 hostname ${BASEDIR}${BINDIR}
ln -fs hostname $(BASEDIR)${BINDIR}/dnsdomainname
ifeq ($(HAVE_HOSTNAME_SYMLINKS),1)
ln -fs hostname $(BASEDIR)${BINDIR}/ypdomainname
ln -fs hostname $(BASEDIR)${BINDIR}/nisdomainname
ln -fs hostname $(BASEDIR)${BINDIR}/domainname
endif
ifeq ($(HAVE_AFDECnet),1)
ln -fs hostname $(BASEDIR)${BINDIR}/nodename
endif
endif
ifeq ($(HAVE_IP_TOOLS),1)
install -m 0755 ipmaddr $(BASEDIR)${SBINDIR}
install -m 0755 iptunnel $(BASEDIR)${SBINDIR}
endif
ifeq ($(HAVE_MII),1)
install -m 0755 mii-tool $(BASEDIR)${SBINDIR}
endif
savebin:
@for i in ${BASEDIR}${SBINDIR}/arp ${BASEDIR}${SBINDIR}/ifconfig \
......
......@@ -91,6 +91,8 @@ bool 'InfiniBand hardware support' HAVE_HWIB y
*
bool 'IP Masquerading support' HAVE_FW_MASQUERADE y
bool 'Build arp and rarp' HAVE_ARP_TOOLS y
bool 'Build hostname' HAVE_HOSTNAME_TOOLS y
bool 'Install hostname NIS/YP symlinks' HAVE_HOSTNAME_SYMLINKS y
bool 'Build iptunnel and ipmaddr' HAVE_IP_TOOLS y
bool 'Build mii-tool' HAVE_MII y
bool 'SELinux support' HAVE_SELINUX n
......@@ -43,6 +43,15 @@ IGNORE_CMDS = ""
ifneq ($(HAVE_ARP_TOOLS),1)
IGNORE_CMDS += |arp.?|rarp.?
endif
ifneq ($(HAVE_HOSTNAME_TOOLS),1)
IGNORE_CMDS += |dnsdomainname.?|hostname.?
endif
ifneq ($(HAVE_HOSTNAME_SYMLINKS),1)
IGNORE_CMDS += |domainname.?|nisdomainname.?|ypdomainname.?
endif
ifneq ($(HAVE_AFDECnet),1)
IGNORE_CMDS += |nodename.?
endif
ifneq ($(HAVE_IP_TOOLS),1)
IGNORE_CMDS += |ipmaddr.?|iptunnel.?
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment