From a73be61a80f7331c35adfa540bcf8f1546ff1e33 Mon Sep 17 00:00:00 2001 From: Hans Rosenfeld Date: Wed, 4 Aug 2021 15:22:53 +0200 Subject: 2554 ipadm needs IPMP configuration support Contributed by: Ivan Krivonos Contributed by: Yuri Pankov Reviewed by: C Fraire Reviewed by: Yuri Pankov Reviewed by: Andy Fiddaman Reviewed by: Ryan Goodfellow Approved by: Richard Lowe --- usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile | 17 +++-- usr/src/cmd/cmd-inet/usr.lib/in.mpathd/net-ipmp | 31 +++++++++ .../cmd-inet/usr.lib/in.mpathd/network-ipmp.xml | 78 ++++++++++++++++++++++ 3 files changed, 117 insertions(+), 9 deletions(-) create mode 100644 usr/src/cmd/cmd-inet/usr.lib/in.mpathd/net-ipmp create mode 100644 usr/src/cmd/cmd-inet/usr.lib/in.mpathd/network-ipmp.xml (limited to 'usr/src/cmd/cmd-inet/usr.lib') diff --git a/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile b/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile index 3668af100b..d63134dae8 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile +++ b/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile @@ -22,16 +22,21 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2021 Tintri by DDN, Inc. All rights reserved. +# PROG = in.mpathd ROOTFS_PROG = $(PROG) OBJS = mpd_tables.o mpd_main.o mpd_probe.o SRCS = $(OBJS:%.o=%.c) DEFAULTFILES = mpathd.dfl +SVCMETHOD = net-ipmp +MANIFEST = network-ipmp.xml include ../../../Makefile.cmd ROOTCMDDIR = $(ROOT)/lib/inet +ROOTMANIFESTDIR = $(ROOTSVCNETWORK) POFILE = $(PROG).po POFILES = $(SRCS:%.c=%.po) @@ -63,15 +68,9 @@ $(PROG): $(OBJS) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK) $(POST_PROCESS) -include ../Makefile.lib - -$(ROOTLIBINETPROG): - $(RM) $@; $(SYMLINK) ../../../lib/inet/$(PROG) $@ - -$(ROOTSBINPROG): - $(RM) $@; $(SYMLINK) ../lib/inet/$(PROG) $@ +check: $(CHKMANIFEST) -install: all $(ROOTLIBINETPROG) $(ROOTSBINPROG) $(ROOTCMD) \ +install: all $(ROOTCMD) $(ROOTMANIFEST) $(ROOTSVCMETHOD) \ $(ROOTETCDEFAULTFILES) clean: @@ -79,7 +78,7 @@ clean: lint: lint_SRCS -$(POFILE): $(POFILES) +$(POFILE): $(POFILES) $(RM) $@ $(CAT) $(POFILES) > $@ diff --git a/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/net-ipmp b/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/net-ipmp new file mode 100644 index 0000000000..be4263a74b --- /dev/null +++ b/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/net-ipmp @@ -0,0 +1,31 @@ +#!/sbin/sh +# +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2021 Tintri by DDN, Inc. All rights reserved. +# + +. /lib/svc/share/smf_include.sh + +if [ -z "$SMF_FMRI" ]; then + echo "this script can only be invoked by smf(5)" + exit $SMF_EXIT_ERR_NOSMF +fi + +smf_configure_ip || exit $SMF_EXIT_ERR_FATAL + +if /lib/inet/in.mpathd; then + exit $SMF_EXIT_OK +else + exit $SMF_EXIT_ERR_FATAL +fi diff --git a/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/network-ipmp.xml b/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/network-ipmp.xml new file mode 100644 index 0000000000..282bf5b4df --- /dev/null +++ b/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/network-ipmp.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3