From 7239d1f13d5e5a02f2416ed6894f785bd9e911d6 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Thu, 25 Jan 2024 05:28:31 -0800 Subject: [PATCH 1/4] src: reorganize source tree Problem: the powerman source tree layout is a bit awkward: powerman code itself is split into three directories, and source code is at the top level. Move source to a src subdirectory. Consolidate powerman, powermand, and libpowerman directories. --- .typos.toml | 2 +- Makefile.am | 17 +---- configure.ac | 19 +++-- httppower/Makefile.am | 8 -- libpowerman/Makefile.am | 13 ---- plmpower/Makefile.am | 10 --- powerman/Makefile.am | 19 ----- powermand/Makefile.am | 38 ---------- snmppower/Makefile.am | 8 -- src/Makefile.am | 15 ++++ src/httppower/Makefile.am | 12 +++ {httppower => src/httppower}/httppower.c | 0 {libcommon => src/libcommon}/Makefile.am | 3 +- {libcommon => src/libcommon}/argv.c | 0 {libcommon => src/libcommon}/argv.h | 0 {libcommon => src/libcommon}/client_proto.h | 0 {libcommon => src/libcommon}/debug.c | 0 {libcommon => src/libcommon}/debug.h | 0 {libcommon => src/libcommon}/error.c | 0 {libcommon => src/libcommon}/error.h | 0 {libcommon => src/libcommon}/hprintf.c | 0 {libcommon => src/libcommon}/hprintf.h | 0 {libcommon => src/libcommon}/pluglist.c | 0 {libcommon => src/libcommon}/pluglist.h | 0 {libcommon => src/libcommon}/powerman.h | 0 {libcommon => src/libcommon}/xmalloc.c | 0 {libcommon => src/libcommon}/xmalloc.h | 0 {libcommon => src/libcommon}/xpoll.c | 0 {libcommon => src/libcommon}/xpoll.h | 0 {libcommon => src/libcommon}/xpty.c | 0 {libcommon => src/libcommon}/xpty.h | 0 {libcommon => src/libcommon}/xread.c | 0 {libcommon => src/libcommon}/xread.h | 0 {libcommon => src/libcommon}/xregex.c | 0 {libcommon => src/libcommon}/xregex.h | 0 {libcommon => src/libcommon}/xsignal.c | 0 {libcommon => src/libcommon}/xsignal.h | 0 {libcommon => src/libcommon}/xtime.h | 0 {libcommon => src/libcommon}/xtypes.h | 0 {liblsd => src/liblsd}/Makefile.am | 7 +- {liblsd => src/liblsd}/cbuf.c | 0 {liblsd => src/liblsd}/cbuf.h | 0 {liblsd => src/liblsd}/hash.c | 0 {liblsd => src/liblsd}/hash.h | 0 {liblsd => src/liblsd}/hostlist.c | 0 {liblsd => src/liblsd}/hostlist.h | 0 {liblsd => src/liblsd}/list.c | 0 {liblsd => src/liblsd}/list.h | 0 src/plmpower/Makefile.am | 12 +++ {plmpower => src/plmpower}/plmpower.c | 0 src/powerman/Makefile.am | 76 +++++++++++++++++++ {powermand => src/powerman}/arglist.c | 0 {powermand => src/powerman}/arglist.h | 0 {powermand => src/powerman}/client.c | 0 {powermand => src/powerman}/client.h | 0 {powermand => src/powerman}/daemon.c | 0 {powermand => src/powerman}/daemon.h | 0 {powermand => src/powerman}/device.c | 0 {powermand => src/powerman}/device.h | 0 {powermand => src/powerman}/device_pipe.c | 0 {powermand => src/powerman}/device_pipe.h | 0 {powermand => src/powerman}/device_private.h | 0 {powermand => src/powerman}/device_serial.c | 0 {powermand => src/powerman}/device_serial.h | 0 {powermand => src/powerman}/device_tcp.c | 0 {powermand => src/powerman}/device_tcp.h | 0 {libpowerman => src/powerman}/libpowerman.c | 0 {libpowerman => src/powerman}/libpowerman.h | 0 .../powerman}/libpowerman.pc.in | 0 {powermand => src/powerman}/parse_lex.l | 0 {powermand => src/powerman}/parse_tab.y | 0 {powermand => src/powerman}/parse_util.c | 0 {powermand => src/powerman}/parse_util.h | 0 {powerman => src/powerman}/powerman.c | 0 {powermand => src/powerman}/powermand.c | 0 .../redfishpower}/Makefile.am | 8 +- .../redfishpower}/redfishpower.c | 0 src/snmppower/Makefile.am | 12 +++ {snmppower => src/snmppower}/snmppower.c | 0 test/Makefile.am | 18 +++-- test/t35.conf.in | 2 +- test/t36.conf.in | 2 +- test/t41.conf.in | 2 +- test/tpm | 2 +- 84 files changed, 163 insertions(+), 142 deletions(-) delete mode 100644 httppower/Makefile.am delete mode 100644 libpowerman/Makefile.am delete mode 100644 plmpower/Makefile.am delete mode 100644 powerman/Makefile.am delete mode 100644 powermand/Makefile.am delete mode 100644 snmppower/Makefile.am create mode 100644 src/Makefile.am create mode 100644 src/httppower/Makefile.am rename {httppower => src/httppower}/httppower.c (100%) rename {libcommon => src/libcommon}/Makefile.am (90%) rename {libcommon => src/libcommon}/argv.c (100%) rename {libcommon => src/libcommon}/argv.h (100%) rename {libcommon => src/libcommon}/client_proto.h (100%) rename {libcommon => src/libcommon}/debug.c (100%) rename {libcommon => src/libcommon}/debug.h (100%) rename {libcommon => src/libcommon}/error.c (100%) rename {libcommon => src/libcommon}/error.h (100%) rename {libcommon => src/libcommon}/hprintf.c (100%) rename {libcommon => src/libcommon}/hprintf.h (100%) rename {libcommon => src/libcommon}/pluglist.c (100%) rename {libcommon => src/libcommon}/pluglist.h (100%) rename {libcommon => src/libcommon}/powerman.h (100%) rename {libcommon => src/libcommon}/xmalloc.c (100%) rename {libcommon => src/libcommon}/xmalloc.h (100%) rename {libcommon => src/libcommon}/xpoll.c (100%) rename {libcommon => src/libcommon}/xpoll.h (100%) rename {libcommon => src/libcommon}/xpty.c (100%) rename {libcommon => src/libcommon}/xpty.h (100%) rename {libcommon => src/libcommon}/xread.c (100%) rename {libcommon => src/libcommon}/xread.h (100%) rename {libcommon => src/libcommon}/xregex.c (100%) rename {libcommon => src/libcommon}/xregex.h (100%) rename {libcommon => src/libcommon}/xsignal.c (100%) rename {libcommon => src/libcommon}/xsignal.h (100%) rename {libcommon => src/libcommon}/xtime.h (100%) rename {libcommon => src/libcommon}/xtypes.h (100%) rename {liblsd => src/liblsd}/Makefile.am (65%) rename {liblsd => src/liblsd}/cbuf.c (100%) rename {liblsd => src/liblsd}/cbuf.h (100%) rename {liblsd => src/liblsd}/hash.c (100%) rename {liblsd => src/liblsd}/hash.h (100%) rename {liblsd => src/liblsd}/hostlist.c (100%) rename {liblsd => src/liblsd}/hostlist.h (100%) rename {liblsd => src/liblsd}/list.c (100%) rename {liblsd => src/liblsd}/list.h (100%) create mode 100644 src/plmpower/Makefile.am rename {plmpower => src/plmpower}/plmpower.c (100%) create mode 100644 src/powerman/Makefile.am rename {powermand => src/powerman}/arglist.c (100%) rename {powermand => src/powerman}/arglist.h (100%) rename {powermand => src/powerman}/client.c (100%) rename {powermand => src/powerman}/client.h (100%) rename {powermand => src/powerman}/daemon.c (100%) rename {powermand => src/powerman}/daemon.h (100%) rename {powermand => src/powerman}/device.c (100%) rename {powermand => src/powerman}/device.h (100%) rename {powermand => src/powerman}/device_pipe.c (100%) rename {powermand => src/powerman}/device_pipe.h (100%) rename {powermand => src/powerman}/device_private.h (100%) rename {powermand => src/powerman}/device_serial.c (100%) rename {powermand => src/powerman}/device_serial.h (100%) rename {powermand => src/powerman}/device_tcp.c (100%) rename {powermand => src/powerman}/device_tcp.h (100%) rename {libpowerman => src/powerman}/libpowerman.c (100%) rename {libpowerman => src/powerman}/libpowerman.h (100%) rename {libpowerman => src/powerman}/libpowerman.pc.in (100%) rename {powermand => src/powerman}/parse_lex.l (100%) rename {powermand => src/powerman}/parse_tab.y (100%) rename {powermand => src/powerman}/parse_util.c (100%) rename {powermand => src/powerman}/parse_util.h (100%) rename {powerman => src/powerman}/powerman.c (100%) rename {powermand => src/powerman}/powermand.c (100%) rename {redfishpower => src/redfishpower}/Makefile.am (53%) rename {redfishpower => src/redfishpower}/redfishpower.c (100%) create mode 100644 src/snmppower/Makefile.am rename {snmppower => src/snmppower}/snmppower.c (100%) diff --git a/.typos.toml b/.typos.toml index 3d61fe6f..c0b980a6 100644 --- a/.typos.toml +++ b/.typos.toml @@ -4,7 +4,7 @@ [files] extend-exclude = [ "config/*", - "liblsd/*", + "src/liblsd/*", ] [default.extend-words] diff --git a/Makefile.am b/Makefile.am index 5ea7c606..f3a86f88 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,24 +3,9 @@ SUBDIRS = \ man \ scripts \ heartbeat \ - liblsd \ - libcommon \ - powerman \ - powermand \ - libpowerman \ - plmpower \ + src \ test -if WITH_HTTPPOWER -SUBDIRS += httppower -endif -if WITH_SNMPPOWER -SUBDIRS += snmppower -endif -if WITH_REDFISHPOWER -SUBDIRS += redfishpower -endif - # Create run dir for powerman. Chown will fail if non root - ignore it. install-data-local: -$(top_srcdir)/config/install-sh -m 755 -d \ diff --git a/configure.ac b/configure.ac index c8019da4..1cf2ae69 100644 --- a/configure.ac +++ b/configure.ac @@ -118,16 +118,15 @@ AC_RUNAS AC_CONFIG_FILES( \ Makefile \ examples/powerman_el72.spec \ - libpowerman/Makefile \ - libpowerman/libpowerman.pc \ - liblsd/Makefile \ - libcommon/Makefile \ - powerman/Makefile \ - powermand/Makefile \ - httppower/Makefile \ - redfishpower/Makefile \ - snmppower/Makefile \ - plmpower/Makefile \ + src/Makefile \ + src/powerman/libpowerman.pc \ + src/liblsd/Makefile \ + src/libcommon/Makefile \ + src/powerman/Makefile \ + src/httppower/Makefile \ + src/redfishpower/Makefile \ + src/snmppower/Makefile \ + src/plmpower/Makefile \ etc/Makefile \ scripts/Makefile \ scripts/powerman.service \ diff --git a/httppower/Makefile.am b/httppower/Makefile.am deleted file mode 100644 index f7dadc0e..00000000 --- a/httppower/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -AM_CFLAGS = @WARNING_CFLAGS@ - -AM_CPPFLAGS = -I$(top_srcdir)/libcommon - -sbin_PROGRAMS = httppower - -httppower_SOURCES = httppower.c -httppower_LDADD = $(top_builddir)/libcommon/libcommon.a $(LIBCURL) $(LIBFORKPTY) diff --git a/libpowerman/Makefile.am b/libpowerman/Makefile.am deleted file mode 100644 index eae38857..00000000 --- a/libpowerman/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -AM_CFLAGS = @WARNING_CFLAGS@ - -AM_CPPFLAGS = -I$(top_srcdir)/libcommon - -lib_LTLIBRARIES = libpowerman.la - -libpowerman_la_SOURCES = \ - libpowerman.c - -if WITH_PKG_CONFIG -pkgconfig_DATA = libpowerman.pc -endif -include_HEADERS = libpowerman.h diff --git a/plmpower/Makefile.am b/plmpower/Makefile.am deleted file mode 100644 index 5ac1cc52..00000000 --- a/plmpower/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AM_CFLAGS = @WARNING_CFLAGS@ - -AM_CPPFLAGS = -I$(top_srcdir)/libcommon - -sbin_PROGRAMS = plmpower - -plmpower_SOURCES = plmpower.c - -plmpower_LDADD = $(top_builddir)/libcommon/libcommon.a - diff --git a/powerman/Makefile.am b/powerman/Makefile.am deleted file mode 100644 index e02e995b..00000000 --- a/powerman/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -AM_CFLAGS = @WARNING_CFLAGS@ - -AM_CPPFLAGS = -I$(top_srcdir)/liblsd -I$(top_srcdir)/libcommon - -bin_PROGRAMS = powerman pm$(EXEEXT) - -common_ldadd = \ - $(top_builddir)/liblsd/liblsd.a \ - $(top_builddir)/libcommon/libcommon.a - -powerman_SOURCES = powerman.c - -powerman_LDADD = $(common_ldadd) $(LIBGENDERS) $(LIBFORKPTY) - -pm_SOURCES = - -pm$(EXEEXT): powerman - rm -f $@ - $(LN_S) $< $@ diff --git a/powermand/Makefile.am b/powermand/Makefile.am deleted file mode 100644 index 719a88c5..00000000 --- a/powermand/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -AM_CFLAGS = @WARNING_CFLAGS@ - -AM_CPPFLAGS = -I$(top_srcdir)/liblsd -I$(top_srcdir)/libcommon - -sbin_PROGRAMS = powermand - -powermand_SOURCES = \ - arglist.c \ - arglist.h \ - client.c \ - client.h \ - daemon.c \ - daemon.h \ - device.c \ - device.h \ - device_pipe.c \ - device_pipe.h \ - device_private.h \ - device_serial.c \ - device_serial.h \ - device_tcp.c \ - device_tcp.h \ - parse_lex.l \ - parse_tab.y \ - parse_util.c \ - parse_util.h \ - powermand.c - -powermand_LDADD = \ - $(top_builddir)/liblsd/liblsd.a \ - $(top_builddir)/libcommon/libcommon.a \ - $(LIBWRAP) $(LIBFORKPTY) - -AM_YFLAGS = -d - -parse_lex.c : parse_tab.h - -CLEANFILES = parse_lex.c parse_tab.c parse_tab.h diff --git a/snmppower/Makefile.am b/snmppower/Makefile.am deleted file mode 100644 index 26ef0433..00000000 --- a/snmppower/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -AM_CFLAGS = @WARNING_CFLAGS@ - -AM_CPPFLAGS = -I$(top_srcdir)/libcommon - -sbin_PROGRAMS = snmppower - -snmppower_SOURCES = snmppower.c -snmppower_LDADD = $(top_builddir)/libcommon/libcommon.a $(LIBNETSNMP) $(LIBFORKPTY) diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 00000000..d4509e5e --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,15 @@ +SUBDIRS = \ + liblsd \ + libcommon \ + powerman \ + plmpower + +if WITH_HTTPPOWER +SUBDIRS += httppower +endif +if WITH_SNMPPOWER +SUBDIRS += snmppower +endif +if WITH_REDFISHPOWER +SUBDIRS += redfishpower +endif diff --git a/src/httppower/Makefile.am b/src/httppower/Makefile.am new file mode 100644 index 00000000..ab048c04 --- /dev/null +++ b/src/httppower/Makefile.am @@ -0,0 +1,12 @@ +AM_CFLAGS = @WARNING_CFLAGS@ + +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/libcommon + +sbin_PROGRAMS = httppower + +httppower_SOURCES = httppower.c +httppower_LDADD = \ + $(top_builddir)/src/libcommon/libcommon.a \ + $(LIBCURL) \ + $(LIBFORKPTY) diff --git a/httppower/httppower.c b/src/httppower/httppower.c similarity index 100% rename from httppower/httppower.c rename to src/httppower/httppower.c diff --git a/libcommon/Makefile.am b/src/libcommon/Makefile.am similarity index 90% rename from libcommon/Makefile.am rename to src/libcommon/Makefile.am index 7a3be3e7..77512781 100644 --- a/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -1,6 +1,7 @@ AM_CFLAGS = @WARNING_CFLAGS@ -AM_CPPFLAGS = -I$(top_srcdir)/liblsd +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/liblsd noinst_LIBRARIES = libcommon.a diff --git a/libcommon/argv.c b/src/libcommon/argv.c similarity index 100% rename from libcommon/argv.c rename to src/libcommon/argv.c diff --git a/libcommon/argv.h b/src/libcommon/argv.h similarity index 100% rename from libcommon/argv.h rename to src/libcommon/argv.h diff --git a/libcommon/client_proto.h b/src/libcommon/client_proto.h similarity index 100% rename from libcommon/client_proto.h rename to src/libcommon/client_proto.h diff --git a/libcommon/debug.c b/src/libcommon/debug.c similarity index 100% rename from libcommon/debug.c rename to src/libcommon/debug.c diff --git a/libcommon/debug.h b/src/libcommon/debug.h similarity index 100% rename from libcommon/debug.h rename to src/libcommon/debug.h diff --git a/libcommon/error.c b/src/libcommon/error.c similarity index 100% rename from libcommon/error.c rename to src/libcommon/error.c diff --git a/libcommon/error.h b/src/libcommon/error.h similarity index 100% rename from libcommon/error.h rename to src/libcommon/error.h diff --git a/libcommon/hprintf.c b/src/libcommon/hprintf.c similarity index 100% rename from libcommon/hprintf.c rename to src/libcommon/hprintf.c diff --git a/libcommon/hprintf.h b/src/libcommon/hprintf.h similarity index 100% rename from libcommon/hprintf.h rename to src/libcommon/hprintf.h diff --git a/libcommon/pluglist.c b/src/libcommon/pluglist.c similarity index 100% rename from libcommon/pluglist.c rename to src/libcommon/pluglist.c diff --git a/libcommon/pluglist.h b/src/libcommon/pluglist.h similarity index 100% rename from libcommon/pluglist.h rename to src/libcommon/pluglist.h diff --git a/libcommon/powerman.h b/src/libcommon/powerman.h similarity index 100% rename from libcommon/powerman.h rename to src/libcommon/powerman.h diff --git a/libcommon/xmalloc.c b/src/libcommon/xmalloc.c similarity index 100% rename from libcommon/xmalloc.c rename to src/libcommon/xmalloc.c diff --git a/libcommon/xmalloc.h b/src/libcommon/xmalloc.h similarity index 100% rename from libcommon/xmalloc.h rename to src/libcommon/xmalloc.h diff --git a/libcommon/xpoll.c b/src/libcommon/xpoll.c similarity index 100% rename from libcommon/xpoll.c rename to src/libcommon/xpoll.c diff --git a/libcommon/xpoll.h b/src/libcommon/xpoll.h similarity index 100% rename from libcommon/xpoll.h rename to src/libcommon/xpoll.h diff --git a/libcommon/xpty.c b/src/libcommon/xpty.c similarity index 100% rename from libcommon/xpty.c rename to src/libcommon/xpty.c diff --git a/libcommon/xpty.h b/src/libcommon/xpty.h similarity index 100% rename from libcommon/xpty.h rename to src/libcommon/xpty.h diff --git a/libcommon/xread.c b/src/libcommon/xread.c similarity index 100% rename from libcommon/xread.c rename to src/libcommon/xread.c diff --git a/libcommon/xread.h b/src/libcommon/xread.h similarity index 100% rename from libcommon/xread.h rename to src/libcommon/xread.h diff --git a/libcommon/xregex.c b/src/libcommon/xregex.c similarity index 100% rename from libcommon/xregex.c rename to src/libcommon/xregex.c diff --git a/libcommon/xregex.h b/src/libcommon/xregex.h similarity index 100% rename from libcommon/xregex.h rename to src/libcommon/xregex.h diff --git a/libcommon/xsignal.c b/src/libcommon/xsignal.c similarity index 100% rename from libcommon/xsignal.c rename to src/libcommon/xsignal.c diff --git a/libcommon/xsignal.h b/src/libcommon/xsignal.h similarity index 100% rename from libcommon/xsignal.h rename to src/libcommon/xsignal.h diff --git a/libcommon/xtime.h b/src/libcommon/xtime.h similarity index 100% rename from libcommon/xtime.h rename to src/libcommon/xtime.h diff --git a/libcommon/xtypes.h b/src/libcommon/xtypes.h similarity index 100% rename from libcommon/xtypes.h rename to src/libcommon/xtypes.h diff --git a/liblsd/Makefile.am b/src/liblsd/Makefile.am similarity index 65% rename from liblsd/Makefile.am rename to src/liblsd/Makefile.am index 940e5123..fa4bcb66 100644 --- a/liblsd/Makefile.am +++ b/src/liblsd/Makefile.am @@ -1,5 +1,8 @@ -AM_CFLAGS = @WARNING_CFLAGS@ \ - -Wno-parentheses -Wno-error=parentheses +AM_CFLAGS = \ + @WARNING_CFLAGS@ \ + -Wno-parentheses \ + -Wno-error=parentheses + AM_CPPFLAGS = noinst_LIBRARIES = liblsd.a diff --git a/liblsd/cbuf.c b/src/liblsd/cbuf.c similarity index 100% rename from liblsd/cbuf.c rename to src/liblsd/cbuf.c diff --git a/liblsd/cbuf.h b/src/liblsd/cbuf.h similarity index 100% rename from liblsd/cbuf.h rename to src/liblsd/cbuf.h diff --git a/liblsd/hash.c b/src/liblsd/hash.c similarity index 100% rename from liblsd/hash.c rename to src/liblsd/hash.c diff --git a/liblsd/hash.h b/src/liblsd/hash.h similarity index 100% rename from liblsd/hash.h rename to src/liblsd/hash.h diff --git a/liblsd/hostlist.c b/src/liblsd/hostlist.c similarity index 100% rename from liblsd/hostlist.c rename to src/liblsd/hostlist.c diff --git a/liblsd/hostlist.h b/src/liblsd/hostlist.h similarity index 100% rename from liblsd/hostlist.h rename to src/liblsd/hostlist.h diff --git a/liblsd/list.c b/src/liblsd/list.c similarity index 100% rename from liblsd/list.c rename to src/liblsd/list.c diff --git a/liblsd/list.h b/src/liblsd/list.h similarity index 100% rename from liblsd/list.h rename to src/liblsd/list.h diff --git a/src/plmpower/Makefile.am b/src/plmpower/Makefile.am new file mode 100644 index 00000000..74ae3df5 --- /dev/null +++ b/src/plmpower/Makefile.am @@ -0,0 +1,12 @@ +AM_CFLAGS = @WARNING_CFLAGS@ + +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/libcommon + +sbin_PROGRAMS = plmpower + +plmpower_SOURCES = plmpower.c + +plmpower_LDADD = \ + $(top_builddir)/src/libcommon/libcommon.a + diff --git a/plmpower/plmpower.c b/src/plmpower/plmpower.c similarity index 100% rename from plmpower/plmpower.c rename to src/plmpower/plmpower.c diff --git a/src/powerman/Makefile.am b/src/powerman/Makefile.am new file mode 100644 index 00000000..c39e52e5 --- /dev/null +++ b/src/powerman/Makefile.am @@ -0,0 +1,76 @@ +AM_CFLAGS = @WARNING_CFLAGS@ + +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/liblsd \ + -I$(top_srcdir)/src/libcommon + +bin_PROGRAMS = \ + powerman \ + pm$(EXEEXT) + +sbin_PROGRAMS = \ + powermand + +lib_LTLIBRARIES = \ + libpowerman.la + +include_HEADERS = \ + libpowerman.h + +powerman_SOURCES = \ + powerman.c + +powerman_LDADD = \ + $(top_builddir)/src/liblsd/liblsd.a \ + $(top_builddir)/src/libcommon/libcommon.a \ + $(LIBGENDERS) \ + $(LIBFORKPTY) + +pm_SOURCES = + +pm$(EXEEXT): powerman + rm -f $@ + $(LN_S) $< $@ + +powermand_SOURCES = \ + arglist.c \ + arglist.h \ + client.c \ + client.h \ + daemon.c \ + daemon.h \ + device.c \ + device.h \ + device_pipe.c \ + device_pipe.h \ + device_private.h \ + device_serial.c \ + device_serial.h \ + device_tcp.c \ + device_tcp.h \ + parse_lex.l \ + parse_tab.y \ + parse_util.c \ + parse_util.h \ + powermand.c + +powermand_LDADD = \ + $(top_builddir)/src/liblsd/liblsd.a \ + $(top_builddir)/src/libcommon/libcommon.a \ + $(LIBWRAP) $(LIBFORKPTY) + +AM_YFLAGS = -d + +parse_lex.c : parse_tab.h + +CLEANFILES = \ + parse_lex.c \ + parse_tab.c \ + parse_tab.h + +libpowerman_la_SOURCES = \ + libpowerman.c + +if WITH_PKG_CONFIG +pkgconfig_DATA = libpowerman.pc +endif diff --git a/powermand/arglist.c b/src/powerman/arglist.c similarity index 100% rename from powermand/arglist.c rename to src/powerman/arglist.c diff --git a/powermand/arglist.h b/src/powerman/arglist.h similarity index 100% rename from powermand/arglist.h rename to src/powerman/arglist.h diff --git a/powermand/client.c b/src/powerman/client.c similarity index 100% rename from powermand/client.c rename to src/powerman/client.c diff --git a/powermand/client.h b/src/powerman/client.h similarity index 100% rename from powermand/client.h rename to src/powerman/client.h diff --git a/powermand/daemon.c b/src/powerman/daemon.c similarity index 100% rename from powermand/daemon.c rename to src/powerman/daemon.c diff --git a/powermand/daemon.h b/src/powerman/daemon.h similarity index 100% rename from powermand/daemon.h rename to src/powerman/daemon.h diff --git a/powermand/device.c b/src/powerman/device.c similarity index 100% rename from powermand/device.c rename to src/powerman/device.c diff --git a/powermand/device.h b/src/powerman/device.h similarity index 100% rename from powermand/device.h rename to src/powerman/device.h diff --git a/powermand/device_pipe.c b/src/powerman/device_pipe.c similarity index 100% rename from powermand/device_pipe.c rename to src/powerman/device_pipe.c diff --git a/powermand/device_pipe.h b/src/powerman/device_pipe.h similarity index 100% rename from powermand/device_pipe.h rename to src/powerman/device_pipe.h diff --git a/powermand/device_private.h b/src/powerman/device_private.h similarity index 100% rename from powermand/device_private.h rename to src/powerman/device_private.h diff --git a/powermand/device_serial.c b/src/powerman/device_serial.c similarity index 100% rename from powermand/device_serial.c rename to src/powerman/device_serial.c diff --git a/powermand/device_serial.h b/src/powerman/device_serial.h similarity index 100% rename from powermand/device_serial.h rename to src/powerman/device_serial.h diff --git a/powermand/device_tcp.c b/src/powerman/device_tcp.c similarity index 100% rename from powermand/device_tcp.c rename to src/powerman/device_tcp.c diff --git a/powermand/device_tcp.h b/src/powerman/device_tcp.h similarity index 100% rename from powermand/device_tcp.h rename to src/powerman/device_tcp.h diff --git a/libpowerman/libpowerman.c b/src/powerman/libpowerman.c similarity index 100% rename from libpowerman/libpowerman.c rename to src/powerman/libpowerman.c diff --git a/libpowerman/libpowerman.h b/src/powerman/libpowerman.h similarity index 100% rename from libpowerman/libpowerman.h rename to src/powerman/libpowerman.h diff --git a/libpowerman/libpowerman.pc.in b/src/powerman/libpowerman.pc.in similarity index 100% rename from libpowerman/libpowerman.pc.in rename to src/powerman/libpowerman.pc.in diff --git a/powermand/parse_lex.l b/src/powerman/parse_lex.l similarity index 100% rename from powermand/parse_lex.l rename to src/powerman/parse_lex.l diff --git a/powermand/parse_tab.y b/src/powerman/parse_tab.y similarity index 100% rename from powermand/parse_tab.y rename to src/powerman/parse_tab.y diff --git a/powermand/parse_util.c b/src/powerman/parse_util.c similarity index 100% rename from powermand/parse_util.c rename to src/powerman/parse_util.c diff --git a/powermand/parse_util.h b/src/powerman/parse_util.h similarity index 100% rename from powermand/parse_util.h rename to src/powerman/parse_util.h diff --git a/powerman/powerman.c b/src/powerman/powerman.c similarity index 100% rename from powerman/powerman.c rename to src/powerman/powerman.c diff --git a/powermand/powermand.c b/src/powerman/powermand.c similarity index 100% rename from powermand/powermand.c rename to src/powerman/powermand.c diff --git a/redfishpower/Makefile.am b/src/redfishpower/Makefile.am similarity index 53% rename from redfishpower/Makefile.am rename to src/redfishpower/Makefile.am index d02f3ea5..64585318 100644 --- a/redfishpower/Makefile.am +++ b/src/redfishpower/Makefile.am @@ -1,14 +1,14 @@ AM_CFLAGS = @WARNING_CFLAGS@ AM_CPPFLAGS = \ - -I$(top_srcdir)/liblsd \ - -I$(top_srcdir)/libcommon + -I$(top_srcdir)/src/liblsd \ + -I$(top_srcdir)/src/libcommon sbin_PROGRAMS = redfishpower redfishpower_SOURCES = redfishpower.c redfishpower_LDADD = \ - $(top_builddir)/liblsd/liblsd.a \ - $(top_builddir)/libcommon/libcommon.a \ + $(top_builddir)/src/liblsd/liblsd.a \ + $(top_builddir)/src/libcommon/libcommon.a \ $(LIBCURL) \ $(LIBJANSSON) diff --git a/redfishpower/redfishpower.c b/src/redfishpower/redfishpower.c similarity index 100% rename from redfishpower/redfishpower.c rename to src/redfishpower/redfishpower.c diff --git a/src/snmppower/Makefile.am b/src/snmppower/Makefile.am new file mode 100644 index 00000000..b7c6c07b --- /dev/null +++ b/src/snmppower/Makefile.am @@ -0,0 +1,12 @@ +AM_CFLAGS = @WARNING_CFLAGS@ + +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/libcommon + +sbin_PROGRAMS = snmppower + +snmppower_SOURCES = snmppower.c +snmppower_LDADD = \ + $(top_builddir)/src/libcommon/libcommon.a \ + $(LIBNETSNMP) \ + $(LIBFORKPTY) diff --git a/snmppower/snmppower.c b/src/snmppower/snmppower.c similarity index 100% rename from snmppower/snmppower.c rename to src/snmppower/snmppower.c diff --git a/test/Makefile.am b/test/Makefile.am index 6911fe00..80cad0cf 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -24,8 +24,8 @@ dist_check_SCRIPTS = \ $(TESTS) TESTS_ENVIRONMENT = env -TESTS_ENVIRONMENT += "PATH_POWERMAN=$(top_builddir)/powerman/powerman" -TESTS_ENVIRONMENT += "PATH_POWERMAND=$(top_builddir)/powermand/powermand" +TESTS_ENVIRONMENT += "PATH_POWERMAN=$(top_builddir)/src/powerman/powerman" +TESTS_ENVIRONMENT += "PATH_POWERMAND=$(top_builddir)/src/powerman/powermand" TESTS_ENVIRONMENT += "PATH_ETC=$(top_builddir)/etc" TESTS_ENVIRONMENT += "PATH_POWERMAN_STONITH=$(top_srcdir)/heartbeat/powerman" TESTS_ENVIRONMENT += "TEST_SRCDIR=$(top_srcdir)/test" @@ -44,13 +44,13 @@ CLEANFILES = *.out *.err *.diff AM_CFLAGS = @WARNING_CFLAGS@ AM_CPPFLAGS = \ - -I$(top_srcdir)/libcommon \ - -I$(top_srcdir)/libpowerman \ - -I$(top_srcdir)/liblsd + -I$(top_srcdir)/src/libcommon \ + -I$(top_srcdir)/src/liblsd \ + -I$(top_srcdir)/src/powerman common_ldadd = \ - $(top_builddir)/liblsd/liblsd.a \ - $(top_builddir)/libcommon/libcommon.a \ + $(top_builddir)/src/liblsd/liblsd.a \ + $(top_builddir)/src/libcommon/libcommon.a \ $(LIBFORKPTY) vpcd_SOURCES = vpcd.c @@ -102,7 +102,9 @@ redfish_httppower_SOURCES = redfish-httppower.c redfish_httppower_LDADD = $(common_ldadd) cli_SOURCES = cli.c -cli_LDADD = -L$(top_builddir)/libpowerman -lpowerman +cli_LDADD = \ + -L$(top_builddir)/src/powerman \ + -lpowerman check_DATA = \ mcr.conf sierra.conf \ diff --git a/test/t35.conf.in b/test/t35.conf.in index 812684e9..0b1afab1 100644 --- a/test/t35.conf.in +++ b/test/t35.conf.in @@ -1,3 +1,3 @@ include "@top_srcdir@/etc/powerman.dev" -device "p0" "powerman" "@top_builddir@/powermand/powermand -f -c @top_builddir@/test/test4.conf -s |&" +device "p0" "powerman" "@top_builddir@/src/powerman/powermand -f -c @top_builddir@/test/test4.conf -s |&" node "t[0-63]" "p0" diff --git a/test/t36.conf.in b/test/t36.conf.in index 090fbc0f..f974665d 100644 --- a/test/t36.conf.in +++ b/test/t36.conf.in @@ -1,3 +1,3 @@ include "@top_srcdir@/etc/powerman.dev" -device "p0" "powerman" "@top_builddir@/powermand/powermand -f -c @top_builddir@/test/test4.conf -s |&" +device "p0" "powerman" "@top_builddir@/src/powerman/powermand -f -c @top_builddir@/test/test4.conf -s |&" node "x[0-63]" "p0" "t[0-63]" diff --git a/test/t41.conf.in b/test/t41.conf.in index 8f831551..e71ce548 100644 --- a/test/t41.conf.in +++ b/test/t41.conf.in @@ -1,4 +1,4 @@ include "@top_srcdir@/etc/plmpower.dev" -device "i0" "plmpower" "@top_builddir@/plmpower/plmpower -T |&" +device "i0" "plmpower" "@top_builddir@/src/plmpower/plmpower -T |&" node "t0" "i0" "aa.bb.cc" node "t1" "i0" "G1" diff --git a/test/tpm b/test/tpm index d6342759..5885c840 100755 --- a/test/tpm +++ b/test/tpm @@ -1,6 +1,6 @@ #!/bin/bash if [ "$PATH_POWERMAND" = "" ]; then - PATH_POWERMAND=../src/powermand + PATH_POWERMAND=../src/powerman/powermand fi $PATH_POWERMAND -f -c t51.conf -s From d870a61cc870e2edff1c43e7b07e94636d1e9528 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Thu, 25 Jan 2024 05:43:56 -0800 Subject: [PATCH 2/4] etc: move device scripts to a subdirectory Problem: there are a zillion device scripts cluttering up etc. Put them in a "devices" subdir. --- etc/Makefile.am | 122 +++++++++--------- etc/{ => devices}/apc-snmp.dev | 0 etc/{ => devices}/apc.dev | 0 etc/{ => devices}/apc7900.dev | 0 etc/{ => devices}/apc7900v3.dev | 0 etc/{ => devices}/apc7920.dev | 0 etc/{ => devices}/apc8941.dev | 0 etc/{ => devices}/apcnew.dev | 0 etc/{ => devices}/apcold.dev | 0 etc/{ => devices}/apcpdu.dev | 0 etc/{ => devices}/apcpdu3.dev | 0 etc/{ => devices}/appro-gb2.dev | 0 etc/{ => devices}/appro-greenblade.dev | 0 etc/{ => devices}/bashfun.dev | 0 etc/{ => devices}/baytech-rpc18d-nc.dev | 0 etc/{ => devices}/baytech-rpc22.dev | 0 etc/{ => devices}/baytech-rpc28-nc.dev | 0 etc/{ => devices}/baytech-rpc3-nc.dev | 0 etc/{ => devices}/baytech-snmp.dev | 0 etc/{ => devices}/baytech.dev | 0 etc/{ => devices}/cb-7050.dev | 0 etc/{ => devices}/cyclades-pm10.dev | 0 etc/{ => devices}/cyclades-pm20.dev | 0 etc/{ => devices}/cyclades-pm42.dev | 0 etc/{ => devices}/cyclades-pm8.dev | 0 etc/{ => devices}/dli.dev | 0 etc/{ => devices}/dli4.dev | 0 .../eaton-epdu-blue-switched.dev | 0 etc/{ => devices}/eaton-revelation-snmp.dev | 0 etc/{ => devices}/hp3488.dev | 0 etc/{ => devices}/hpilo.dev | 0 etc/{ => devices}/hpmp.dev | 0 etc/{ => devices}/hpmpblade.dev | 0 etc/{ => devices}/hpmpcell.dev | 0 etc/{ => devices}/hpmpdome.dev | 0 etc/{ => devices}/ibmbladecenter.dev | 0 etc/{ => devices}/icebox.dev | 0 etc/{ => devices}/icebox3.dev | 0 etc/{ => devices}/ics8064.dev | 0 etc/{ => devices}/ilom.dev | 0 etc/{ => devices}/ipmi.dev | 0 etc/{ => devices}/ipmipower-serial.dev | 0 etc/{ => devices}/ipmipower.dev | 0 etc/{ => devices}/kvm-ssh.dev | 0 etc/{ => devices}/kvm.dev | 0 etc/{ => devices}/lom.dev | 0 etc/{ => devices}/openbmc.dev | 0 etc/{ => devices}/phantom.dev | 0 etc/{ => devices}/plmpower.dev | 0 etc/{ => devices}/powerman.dev | 0 etc/{ => devices}/rancid-cisco-poe.dev | 0 etc/{ => devices}/raritan-px4316.dev | 0 etc/{ => devices}/raritan-px5523.dev | 0 etc/{ => devices}/redfish-supermicro.dev | 0 .../redfishpower-cray-r272z30.dev | 0 .../redfishpower-cray-windom.dev | 0 etc/{ => devices}/redfishpower-supermicro.dev | 0 etc/{ => devices}/sentry_cdu.dev | 0 etc/{ => devices}/swpdu.dev | 0 etc/{ => devices}/vpc.dev | 0 etc/{ => devices}/wti-rps10.dev | 0 etc/{ => devices}/wti.dev | 0 test/mcr.conf.in | 2 +- test/sierra.conf.in | 4 +- test/t21.conf.in | 2 +- test/t22.conf.in | 2 +- test/t23.conf.in | 2 +- test/t24.conf.in | 2 +- test/t27.conf.in | 2 +- test/t28.conf.in | 2 +- test/t29.conf.in | 2 +- test/t30.conf.in | 2 +- test/t31.conf.in | 2 +- test/t32.conf.in | 2 +- test/t33.conf.in | 2 +- test/t34.conf.in | 2 +- test/t35.conf.in | 2 +- test/t36.conf.in | 2 +- test/t37.conf.in | 2 +- test/t38.conf.in | 2 +- test/t39.conf.in | 2 +- test/t40.conf.in | 2 +- test/t41.conf.in | 2 +- test/t42.conf.in | 2 +- test/t43.conf.in | 2 +- test/t44.conf.in | 2 +- test/t46.conf.in | 8 +- test/t47.conf.in | 2 +- test/t48.conf.in | 2 +- test/t49.conf.in | 2 +- test/t50.conf.in | 2 +- test/t51.conf.in | 2 +- test/t53.conf.in | 2 +- test/t54.conf.in | 2 +- test/t55.conf.in | 2 +- test/t60.conf.in | 2 +- test/t61.conf.in | 2 +- test/t62.conf.in | 2 +- test/t63.conf.in | 2 +- test/test.conf.in | 2 +- test/test4.conf.in | 2 +- 101 files changed, 104 insertions(+), 104 deletions(-) rename etc/{ => devices}/apc-snmp.dev (100%) rename etc/{ => devices}/apc.dev (100%) rename etc/{ => devices}/apc7900.dev (100%) rename etc/{ => devices}/apc7900v3.dev (100%) rename etc/{ => devices}/apc7920.dev (100%) rename etc/{ => devices}/apc8941.dev (100%) rename etc/{ => devices}/apcnew.dev (100%) rename etc/{ => devices}/apcold.dev (100%) rename etc/{ => devices}/apcpdu.dev (100%) rename etc/{ => devices}/apcpdu3.dev (100%) rename etc/{ => devices}/appro-gb2.dev (100%) rename etc/{ => devices}/appro-greenblade.dev (100%) rename etc/{ => devices}/bashfun.dev (100%) rename etc/{ => devices}/baytech-rpc18d-nc.dev (100%) rename etc/{ => devices}/baytech-rpc22.dev (100%) rename etc/{ => devices}/baytech-rpc28-nc.dev (100%) rename etc/{ => devices}/baytech-rpc3-nc.dev (100%) rename etc/{ => devices}/baytech-snmp.dev (100%) rename etc/{ => devices}/baytech.dev (100%) rename etc/{ => devices}/cb-7050.dev (100%) rename etc/{ => devices}/cyclades-pm10.dev (100%) rename etc/{ => devices}/cyclades-pm20.dev (100%) rename etc/{ => devices}/cyclades-pm42.dev (100%) rename etc/{ => devices}/cyclades-pm8.dev (100%) rename etc/{ => devices}/dli.dev (100%) rename etc/{ => devices}/dli4.dev (100%) rename etc/{ => devices}/eaton-epdu-blue-switched.dev (100%) rename etc/{ => devices}/eaton-revelation-snmp.dev (100%) rename etc/{ => devices}/hp3488.dev (100%) rename etc/{ => devices}/hpilo.dev (100%) rename etc/{ => devices}/hpmp.dev (100%) rename etc/{ => devices}/hpmpblade.dev (100%) rename etc/{ => devices}/hpmpcell.dev (100%) rename etc/{ => devices}/hpmpdome.dev (100%) rename etc/{ => devices}/ibmbladecenter.dev (100%) rename etc/{ => devices}/icebox.dev (100%) rename etc/{ => devices}/icebox3.dev (100%) rename etc/{ => devices}/ics8064.dev (100%) rename etc/{ => devices}/ilom.dev (100%) rename etc/{ => devices}/ipmi.dev (100%) rename etc/{ => devices}/ipmipower-serial.dev (100%) rename etc/{ => devices}/ipmipower.dev (100%) rename etc/{ => devices}/kvm-ssh.dev (100%) rename etc/{ => devices}/kvm.dev (100%) rename etc/{ => devices}/lom.dev (100%) rename etc/{ => devices}/openbmc.dev (100%) rename etc/{ => devices}/phantom.dev (100%) rename etc/{ => devices}/plmpower.dev (100%) rename etc/{ => devices}/powerman.dev (100%) rename etc/{ => devices}/rancid-cisco-poe.dev (100%) rename etc/{ => devices}/raritan-px4316.dev (100%) rename etc/{ => devices}/raritan-px5523.dev (100%) rename etc/{ => devices}/redfish-supermicro.dev (100%) rename etc/{ => devices}/redfishpower-cray-r272z30.dev (100%) rename etc/{ => devices}/redfishpower-cray-windom.dev (100%) rename etc/{ => devices}/redfishpower-supermicro.dev (100%) rename etc/{ => devices}/sentry_cdu.dev (100%) rename etc/{ => devices}/swpdu.dev (100%) rename etc/{ => devices}/vpc.dev (100%) rename etc/{ => devices}/wti-rps10.dev (100%) rename etc/{ => devices}/wti.dev (100%) diff --git a/etc/Makefile.am b/etc/Makefile.am index e7a0e0dd..17b3a413 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -2,66 +2,66 @@ pkgsysconfdir = $(sysconfdir)/powerman pkgsysconf_DATA = \ powerman.conf.example \ - apc7900.dev \ - apc7900v3.dev \ - apc7920.dev \ - apc8941.dev \ - apc.dev \ - apc-snmp.dev \ - apcnew.dev \ - apcold.dev \ - apcpdu3.dev \ - apcpdu.dev \ - appro-greenblade.dev \ - appro-gb2.dev \ - bashfun.dev \ - baytech.dev \ - baytech-snmp.dev \ - baytech-rpc18d-nc.dev \ - baytech-rpc22.dev \ - baytech-rpc28-nc.dev \ - baytech-rpc3-nc.dev \ - cb-7050.dev \ - cyclades-pm8.dev \ - cyclades-pm10.dev \ - cyclades-pm20.dev \ - cyclades-pm42.dev \ - dli.dev \ - dli4.dev \ - eaton-revelation-snmp.dev \ - eaton-epdu-blue-switched.dev \ - hp3488.dev \ - hpilo.dev \ - hpmp.dev \ - hpmpblade.dev \ - hpmpcell.dev \ - hpmpdome.dev \ - ibmbladecenter.dev \ - icebox.dev \ - icebox3.dev \ - ics8064.dev \ - ilom.dev \ - lom.dev \ - ipmi.dev \ - ipmipower.dev \ - ipmipower-serial.dev \ - kvm.dev \ - kvm-ssh.dev \ - openbmc.dev \ - redfish-supermicro.dev \ - redfishpower-cray-r272z30.dev \ - redfishpower-supermicro.dev \ - redfishpower-cray-windom.dev \ - phantom.dev \ - plmpower.dev \ - powerman.dev \ - rancid-cisco-poe.dev \ - raritan-px4316.dev \ - raritan-px5523.dev \ - sentry_cdu.dev \ - swpdu.dev \ - vpc.dev \ - wti.dev \ - wti-rps10.dev + devices/apc7900.dev \ + devices/apc7900v3.dev \ + devices/apc7920.dev \ + devices/apc8941.dev \ + devices/apc.dev \ + devices/apc-snmp.dev \ + devices/apcnew.dev \ + devices/apcold.dev \ + devices/apcpdu3.dev \ + devices/apcpdu.dev \ + devices/appro-greenblade.dev \ + devices/appro-gb2.dev \ + devices/bashfun.dev \ + devices/baytech.dev \ + devices/baytech-snmp.dev \ + devices/baytech-rpc18d-nc.dev \ + devices/baytech-rpc22.dev \ + devices/baytech-rpc28-nc.dev \ + devices/baytech-rpc3-nc.dev \ + devices/cb-7050.dev \ + devices/cyclades-pm8.dev \ + devices/cyclades-pm10.dev \ + devices/cyclades-pm20.dev \ + devices/cyclades-pm42.dev \ + devices/dli.dev \ + devices/dli4.dev \ + devices/eaton-revelation-snmp.dev \ + devices/eaton-epdu-blue-switched.dev \ + devices/hp3488.dev \ + devices/hpilo.dev \ + devices/hpmp.dev \ + devices/hpmpblade.dev \ + devices/hpmpcell.dev \ + devices/hpmpdome.dev \ + devices/ibmbladecenter.dev \ + devices/icebox.dev \ + devices/icebox3.dev \ + devices/ics8064.dev \ + devices/ilom.dev \ + devices/lom.dev \ + devices/ipmi.dev \ + devices/ipmipower.dev \ + devices/ipmipower-serial.dev \ + devices/kvm.dev \ + devices/kvm-ssh.dev \ + devices/openbmc.dev \ + devices/redfish-supermicro.dev \ + devices/redfishpower-cray-r272z30.dev \ + devices/redfishpower-supermicro.dev \ + devices/redfishpower-cray-windom.dev \ + devices/phantom.dev \ + devices/plmpower.dev \ + devices/powerman.dev \ + devices/rancid-cisco-poe.dev \ + devices/raritan-px4316.dev \ + devices/raritan-px5523.dev \ + devices/sentry_cdu.dev \ + devices/swpdu.dev \ + devices/vpc.dev \ + devices/wti.dev \ + devices/wti-rps10.dev EXTRA_DIST = $(pkgsysconf_DATA) diff --git a/etc/apc-snmp.dev b/etc/devices/apc-snmp.dev similarity index 100% rename from etc/apc-snmp.dev rename to etc/devices/apc-snmp.dev diff --git a/etc/apc.dev b/etc/devices/apc.dev similarity index 100% rename from etc/apc.dev rename to etc/devices/apc.dev diff --git a/etc/apc7900.dev b/etc/devices/apc7900.dev similarity index 100% rename from etc/apc7900.dev rename to etc/devices/apc7900.dev diff --git a/etc/apc7900v3.dev b/etc/devices/apc7900v3.dev similarity index 100% rename from etc/apc7900v3.dev rename to etc/devices/apc7900v3.dev diff --git a/etc/apc7920.dev b/etc/devices/apc7920.dev similarity index 100% rename from etc/apc7920.dev rename to etc/devices/apc7920.dev diff --git a/etc/apc8941.dev b/etc/devices/apc8941.dev similarity index 100% rename from etc/apc8941.dev rename to etc/devices/apc8941.dev diff --git a/etc/apcnew.dev b/etc/devices/apcnew.dev similarity index 100% rename from etc/apcnew.dev rename to etc/devices/apcnew.dev diff --git a/etc/apcold.dev b/etc/devices/apcold.dev similarity index 100% rename from etc/apcold.dev rename to etc/devices/apcold.dev diff --git a/etc/apcpdu.dev b/etc/devices/apcpdu.dev similarity index 100% rename from etc/apcpdu.dev rename to etc/devices/apcpdu.dev diff --git a/etc/apcpdu3.dev b/etc/devices/apcpdu3.dev similarity index 100% rename from etc/apcpdu3.dev rename to etc/devices/apcpdu3.dev diff --git a/etc/appro-gb2.dev b/etc/devices/appro-gb2.dev similarity index 100% rename from etc/appro-gb2.dev rename to etc/devices/appro-gb2.dev diff --git a/etc/appro-greenblade.dev b/etc/devices/appro-greenblade.dev similarity index 100% rename from etc/appro-greenblade.dev rename to etc/devices/appro-greenblade.dev diff --git a/etc/bashfun.dev b/etc/devices/bashfun.dev similarity index 100% rename from etc/bashfun.dev rename to etc/devices/bashfun.dev diff --git a/etc/baytech-rpc18d-nc.dev b/etc/devices/baytech-rpc18d-nc.dev similarity index 100% rename from etc/baytech-rpc18d-nc.dev rename to etc/devices/baytech-rpc18d-nc.dev diff --git a/etc/baytech-rpc22.dev b/etc/devices/baytech-rpc22.dev similarity index 100% rename from etc/baytech-rpc22.dev rename to etc/devices/baytech-rpc22.dev diff --git a/etc/baytech-rpc28-nc.dev b/etc/devices/baytech-rpc28-nc.dev similarity index 100% rename from etc/baytech-rpc28-nc.dev rename to etc/devices/baytech-rpc28-nc.dev diff --git a/etc/baytech-rpc3-nc.dev b/etc/devices/baytech-rpc3-nc.dev similarity index 100% rename from etc/baytech-rpc3-nc.dev rename to etc/devices/baytech-rpc3-nc.dev diff --git a/etc/baytech-snmp.dev b/etc/devices/baytech-snmp.dev similarity index 100% rename from etc/baytech-snmp.dev rename to etc/devices/baytech-snmp.dev diff --git a/etc/baytech.dev b/etc/devices/baytech.dev similarity index 100% rename from etc/baytech.dev rename to etc/devices/baytech.dev diff --git a/etc/cb-7050.dev b/etc/devices/cb-7050.dev similarity index 100% rename from etc/cb-7050.dev rename to etc/devices/cb-7050.dev diff --git a/etc/cyclades-pm10.dev b/etc/devices/cyclades-pm10.dev similarity index 100% rename from etc/cyclades-pm10.dev rename to etc/devices/cyclades-pm10.dev diff --git a/etc/cyclades-pm20.dev b/etc/devices/cyclades-pm20.dev similarity index 100% rename from etc/cyclades-pm20.dev rename to etc/devices/cyclades-pm20.dev diff --git a/etc/cyclades-pm42.dev b/etc/devices/cyclades-pm42.dev similarity index 100% rename from etc/cyclades-pm42.dev rename to etc/devices/cyclades-pm42.dev diff --git a/etc/cyclades-pm8.dev b/etc/devices/cyclades-pm8.dev similarity index 100% rename from etc/cyclades-pm8.dev rename to etc/devices/cyclades-pm8.dev diff --git a/etc/dli.dev b/etc/devices/dli.dev similarity index 100% rename from etc/dli.dev rename to etc/devices/dli.dev diff --git a/etc/dli4.dev b/etc/devices/dli4.dev similarity index 100% rename from etc/dli4.dev rename to etc/devices/dli4.dev diff --git a/etc/eaton-epdu-blue-switched.dev b/etc/devices/eaton-epdu-blue-switched.dev similarity index 100% rename from etc/eaton-epdu-blue-switched.dev rename to etc/devices/eaton-epdu-blue-switched.dev diff --git a/etc/eaton-revelation-snmp.dev b/etc/devices/eaton-revelation-snmp.dev similarity index 100% rename from etc/eaton-revelation-snmp.dev rename to etc/devices/eaton-revelation-snmp.dev diff --git a/etc/hp3488.dev b/etc/devices/hp3488.dev similarity index 100% rename from etc/hp3488.dev rename to etc/devices/hp3488.dev diff --git a/etc/hpilo.dev b/etc/devices/hpilo.dev similarity index 100% rename from etc/hpilo.dev rename to etc/devices/hpilo.dev diff --git a/etc/hpmp.dev b/etc/devices/hpmp.dev similarity index 100% rename from etc/hpmp.dev rename to etc/devices/hpmp.dev diff --git a/etc/hpmpblade.dev b/etc/devices/hpmpblade.dev similarity index 100% rename from etc/hpmpblade.dev rename to etc/devices/hpmpblade.dev diff --git a/etc/hpmpcell.dev b/etc/devices/hpmpcell.dev similarity index 100% rename from etc/hpmpcell.dev rename to etc/devices/hpmpcell.dev diff --git a/etc/hpmpdome.dev b/etc/devices/hpmpdome.dev similarity index 100% rename from etc/hpmpdome.dev rename to etc/devices/hpmpdome.dev diff --git a/etc/ibmbladecenter.dev b/etc/devices/ibmbladecenter.dev similarity index 100% rename from etc/ibmbladecenter.dev rename to etc/devices/ibmbladecenter.dev diff --git a/etc/icebox.dev b/etc/devices/icebox.dev similarity index 100% rename from etc/icebox.dev rename to etc/devices/icebox.dev diff --git a/etc/icebox3.dev b/etc/devices/icebox3.dev similarity index 100% rename from etc/icebox3.dev rename to etc/devices/icebox3.dev diff --git a/etc/ics8064.dev b/etc/devices/ics8064.dev similarity index 100% rename from etc/ics8064.dev rename to etc/devices/ics8064.dev diff --git a/etc/ilom.dev b/etc/devices/ilom.dev similarity index 100% rename from etc/ilom.dev rename to etc/devices/ilom.dev diff --git a/etc/ipmi.dev b/etc/devices/ipmi.dev similarity index 100% rename from etc/ipmi.dev rename to etc/devices/ipmi.dev diff --git a/etc/ipmipower-serial.dev b/etc/devices/ipmipower-serial.dev similarity index 100% rename from etc/ipmipower-serial.dev rename to etc/devices/ipmipower-serial.dev diff --git a/etc/ipmipower.dev b/etc/devices/ipmipower.dev similarity index 100% rename from etc/ipmipower.dev rename to etc/devices/ipmipower.dev diff --git a/etc/kvm-ssh.dev b/etc/devices/kvm-ssh.dev similarity index 100% rename from etc/kvm-ssh.dev rename to etc/devices/kvm-ssh.dev diff --git a/etc/kvm.dev b/etc/devices/kvm.dev similarity index 100% rename from etc/kvm.dev rename to etc/devices/kvm.dev diff --git a/etc/lom.dev b/etc/devices/lom.dev similarity index 100% rename from etc/lom.dev rename to etc/devices/lom.dev diff --git a/etc/openbmc.dev b/etc/devices/openbmc.dev similarity index 100% rename from etc/openbmc.dev rename to etc/devices/openbmc.dev diff --git a/etc/phantom.dev b/etc/devices/phantom.dev similarity index 100% rename from etc/phantom.dev rename to etc/devices/phantom.dev diff --git a/etc/plmpower.dev b/etc/devices/plmpower.dev similarity index 100% rename from etc/plmpower.dev rename to etc/devices/plmpower.dev diff --git a/etc/powerman.dev b/etc/devices/powerman.dev similarity index 100% rename from etc/powerman.dev rename to etc/devices/powerman.dev diff --git a/etc/rancid-cisco-poe.dev b/etc/devices/rancid-cisco-poe.dev similarity index 100% rename from etc/rancid-cisco-poe.dev rename to etc/devices/rancid-cisco-poe.dev diff --git a/etc/raritan-px4316.dev b/etc/devices/raritan-px4316.dev similarity index 100% rename from etc/raritan-px4316.dev rename to etc/devices/raritan-px4316.dev diff --git a/etc/raritan-px5523.dev b/etc/devices/raritan-px5523.dev similarity index 100% rename from etc/raritan-px5523.dev rename to etc/devices/raritan-px5523.dev diff --git a/etc/redfish-supermicro.dev b/etc/devices/redfish-supermicro.dev similarity index 100% rename from etc/redfish-supermicro.dev rename to etc/devices/redfish-supermicro.dev diff --git a/etc/redfishpower-cray-r272z30.dev b/etc/devices/redfishpower-cray-r272z30.dev similarity index 100% rename from etc/redfishpower-cray-r272z30.dev rename to etc/devices/redfishpower-cray-r272z30.dev diff --git a/etc/redfishpower-cray-windom.dev b/etc/devices/redfishpower-cray-windom.dev similarity index 100% rename from etc/redfishpower-cray-windom.dev rename to etc/devices/redfishpower-cray-windom.dev diff --git a/etc/redfishpower-supermicro.dev b/etc/devices/redfishpower-supermicro.dev similarity index 100% rename from etc/redfishpower-supermicro.dev rename to etc/devices/redfishpower-supermicro.dev diff --git a/etc/sentry_cdu.dev b/etc/devices/sentry_cdu.dev similarity index 100% rename from etc/sentry_cdu.dev rename to etc/devices/sentry_cdu.dev diff --git a/etc/swpdu.dev b/etc/devices/swpdu.dev similarity index 100% rename from etc/swpdu.dev rename to etc/devices/swpdu.dev diff --git a/etc/vpc.dev b/etc/devices/vpc.dev similarity index 100% rename from etc/vpc.dev rename to etc/devices/vpc.dev diff --git a/etc/wti-rps10.dev b/etc/devices/wti-rps10.dev similarity index 100% rename from etc/wti-rps10.dev rename to etc/devices/wti-rps10.dev diff --git a/etc/wti.dev b/etc/devices/wti.dev similarity index 100% rename from etc/wti.dev rename to etc/devices/wti.dev diff --git a/test/mcr.conf.in b/test/mcr.conf.in index f4e92bfd..c292f134 100644 --- a/test/mcr.conf.in +++ b/test/mcr.conf.in @@ -4,7 +4,7 @@ # MCR powerman.conf (1152 nodes, 121 iceboxes) - mod to work in test harness. # FIXME: we run out of ptys on some platforms with this many (121) coprocesses # -include "@top_srcdir@/etc/icebox3.dev" +include "@top_srcdir@/etc/devices/icebox3.dev" tcpwrappers yes diff --git a/test/sierra.conf.in b/test/sierra.conf.in index a43b6569..c6300c83 100644 --- a/test/sierra.conf.in +++ b/test/sierra.conf.in @@ -1,7 +1,7 @@ # sierra powerman.conf, modified to work in test harness -include "@top_srcdir@/etc/swpdu.dev" -include "@top_srcdir@/etc/ipmipower.dev" +include "@top_srcdir@/etc/devices/swpdu.dev" +include "@top_srcdir@/etc/devices/ipmipower.dev" #tcpwrappers yes diff --git a/test/t21.conf.in b/test/t21.conf.in index 3cf968b7..10b61e3f 100644 --- a/test/t21.conf.in +++ b/test/t21.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/baytech-rpc3-nc.dev" +include "@top_srcdir@/etc/devices/baytech-rpc3-nc.dev" device "b0" "baytech-rpc3-nc" "@top_builddir@/test/baytech -p rpc3-nc |&" device "b1" "baytech-rpc3-nc" "@top_builddir@/test/baytech -p rpc3-de |&" node "t[0-7]" "b0" diff --git a/test/t22.conf.in b/test/t22.conf.in index 710da69b..022e45ea 100644 --- a/test/t22.conf.in +++ b/test/t22.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/baytech-rpc3-nc.dev" +include "@top_srcdir@/etc/devices/baytech-rpc3-nc.dev" device "b0" "baytech-rpc3-nc" "@top_builddir@/test/baytech -p rpc3-nc |&" device "b1" "baytech-rpc3-nc" "@top_builddir@/test/baytech -p rpc3-nc |&" device "b2" "baytech-rpc3-nc" "@top_builddir@/test/baytech -p rpc3-nc |&" diff --git a/test/t23.conf.in b/test/t23.conf.in index e8076350..95a64e8a 100644 --- a/test/t23.conf.in +++ b/test/t23.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/baytech-rpc28-nc.dev" +include "@top_srcdir@/etc/devices/baytech-rpc28-nc.dev" device "b0" "baytech-rpc28-nc" "@top_builddir@/test/baytech -p rpc28-nc |&" node "t[0-19]" "b0" diff --git a/test/t24.conf.in b/test/t24.conf.in index 6938ed71..8779dc06 100644 --- a/test/t24.conf.in +++ b/test/t24.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/baytech-rpc28-nc.dev" +include "@top_srcdir@/etc/devices/baytech-rpc28-nc.dev" device "b0" "baytech-rpc28-nc" "@top_builddir@/test/baytech -p rpc28-nc |&" device "b1" "baytech-rpc28-nc" "@top_builddir@/test/baytech -p rpc28-nc |&" device "b2" "baytech-rpc28-nc" "@top_builddir@/test/baytech -p rpc28-nc |&" diff --git a/test/t27.conf.in b/test/t27.conf.in index 998db475..bd2109a5 100644 --- a/test/t27.conf.in +++ b/test/t27.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/baytech.dev" +include "@top_srcdir@/etc/devices/baytech.dev" device "b0" "baytech" "@top_builddir@/test/baytech -p rpc3 |&" node "t[0-7]" "b0" diff --git a/test/t28.conf.in b/test/t28.conf.in index 32ebf544..e2fda590 100644 --- a/test/t28.conf.in +++ b/test/t28.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/baytech.dev" +include "@top_srcdir@/etc/devices/baytech.dev" device "b0" "baytech" "@top_builddir@/test/baytech -p rpc3 |&" device "b1" "baytech" "@top_builddir@/test/baytech -p rpc3 |&" device "b2" "baytech" "@top_builddir@/test/baytech -p rpc3 |&" diff --git a/test/t29.conf.in b/test/t29.conf.in index 67beb765..cab166d4 100644 --- a/test/t29.conf.in +++ b/test/t29.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/icebox3.dev" +include "@top_srcdir@/etc/devices/icebox3.dev" device "i0" "icebox3" "@top_builddir@/test/icebox -p v3 |&" node "t[0-9]" "i0" diff --git a/test/t30.conf.in b/test/t30.conf.in index 0b6f9423..be876eb2 100644 --- a/test/t30.conf.in +++ b/test/t30.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/icebox3.dev" +include "@top_srcdir@/etc/devices/icebox3.dev" device "i0" "icebox3" "@top_builddir@/test/icebox -p v3 |&" device "i1" "icebox3" "@top_builddir@/test/icebox -p v3 |&" device "i2" "icebox3" "@top_builddir@/test/icebox -p v3 |&" diff --git a/test/t31.conf.in b/test/t31.conf.in index cbb0ad74..f55380fc 100644 --- a/test/t31.conf.in +++ b/test/t31.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/icebox.dev" +include "@top_srcdir@/etc/devices/icebox.dev" device "i0" "icebox" "@top_builddir@/test/icebox -p v2 |&" node "t[0-9]" "i0" diff --git a/test/t32.conf.in b/test/t32.conf.in index 6dc7fa2f..cdac7700 100644 --- a/test/t32.conf.in +++ b/test/t32.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/icebox.dev" +include "@top_srcdir@/etc/devices/icebox.dev" device "i0" "icebox" "@top_builddir@/test/icebox -p v2 |&" device "i1" "icebox" "@top_builddir@/test/icebox -p v2 |&" device "i2" "icebox" "@top_builddir@/test/icebox -p v2 |&" diff --git a/test/t33.conf.in b/test/t33.conf.in index 5e25ace5..6208a4ab 100644 --- a/test/t33.conf.in +++ b/test/t33.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/icebox3.dev" +include "@top_srcdir@/etc/devices/icebox3.dev" device "i0" "icebox3" "@top_builddir@/test/icebox -p v4 |&" node "t[0-9]" "i0" diff --git a/test/t34.conf.in b/test/t34.conf.in index 8ed9e2d4..bb9cb2b3 100644 --- a/test/t34.conf.in +++ b/test/t34.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/icebox3.dev" +include "@top_srcdir@/etc/devices/icebox3.dev" device "i0" "icebox3" "@top_builddir@/test/icebox -p v4 |&" device "i1" "icebox3" "@top_builddir@/test/icebox -p v4 |&" device "i2" "icebox3" "@top_builddir@/test/icebox -p v4 |&" diff --git a/test/t35.conf.in b/test/t35.conf.in index 0b1afab1..89eacbc7 100644 --- a/test/t35.conf.in +++ b/test/t35.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/powerman.dev" +include "@top_srcdir@/etc/devices/powerman.dev" device "p0" "powerman" "@top_builddir@/src/powerman/powermand -f -c @top_builddir@/test/test4.conf -s |&" node "t[0-63]" "p0" diff --git a/test/t36.conf.in b/test/t36.conf.in index f974665d..f75bd596 100644 --- a/test/t36.conf.in +++ b/test/t36.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/powerman.dev" +include "@top_srcdir@/etc/devices/powerman.dev" device "p0" "powerman" "@top_builddir@/src/powerman/powermand -f -c @top_builddir@/test/test4.conf -s |&" node "x[0-63]" "p0" "t[0-63]" diff --git a/test/t37.conf.in b/test/t37.conf.in index 87e90cb2..b0f208a0 100644 --- a/test/t37.conf.in +++ b/test/t37.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/hp3488.dev" +include "@top_srcdir@/etc/devices/hp3488.dev" device "h0" "hp3488" "@top_builddir@/test/gpib -p hp3488|&" node "t[0-9]" "h0" "[100-109]" node "t[10-19]" "h0" "[200-209]" diff --git a/test/t38.conf.in b/test/t38.conf.in index 02869119..a7045feb 100644 --- a/test/t38.conf.in +++ b/test/t38.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/hp3488.dev" +include "@top_srcdir@/etc/devices/hp3488.dev" device "h0" "hp3488" "@top_builddir@/test/gpib -p hp3488|&" device "h1" "hp3488" "@top_builddir@/test/gpib -p hp3488|&" device "h2" "hp3488" "@top_builddir@/test/gpib -p hp3488|&" diff --git a/test/t39.conf.in b/test/t39.conf.in index 6a60704c..bf20f457 100644 --- a/test/t39.conf.in +++ b/test/t39.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/ics8064.dev" +include "@top_srcdir@/etc/devices/ics8064.dev" device "i0" "ics8064" "@top_builddir@/test/gpib -p ics8064|&" node "t[0-15]" "i0" diff --git a/test/t40.conf.in b/test/t40.conf.in index cdbc8728..f1e105cb 100644 --- a/test/t40.conf.in +++ b/test/t40.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/ics8064.dev" +include "@top_srcdir@/etc/devices/ics8064.dev" device "i0" "ics8064" "@top_builddir@/test/gpib -p ics8064|&" device "i1" "ics8064" "@top_builddir@/test/gpib -p ics8064|&" device "i2" "ics8064" "@top_builddir@/test/gpib -p ics8064|&" diff --git a/test/t41.conf.in b/test/t41.conf.in index e71ce548..8baa988b 100644 --- a/test/t41.conf.in +++ b/test/t41.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/plmpower.dev" +include "@top_srcdir@/etc/devices/plmpower.dev" device "i0" "plmpower" "@top_builddir@/src/plmpower/plmpower -T |&" node "t0" "i0" "aa.bb.cc" node "t1" "i0" "G1" diff --git a/test/t42.conf.in b/test/t42.conf.in index 5a6b369a..c0d15a7a 100644 --- a/test/t42.conf.in +++ b/test/t42.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/dli.dev" +include "@top_srcdir@/etc/devices/dli.dev" device "d0" "dli" "@top_builddir@/test/dli |&" node "t[0-7]" "d0" diff --git a/test/t43.conf.in b/test/t43.conf.in index fe4b9cd5..3d8d07e2 100644 --- a/test/t43.conf.in +++ b/test/t43.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/dli.dev" +include "@top_srcdir@/etc/devices/dli.dev" device "b0" "dli" "@top_builddir@/test/dli |&" device "b1" "dli" "@top_builddir@/test/dli |&" device "b2" "dli" "@top_builddir@/test/dli |&" diff --git a/test/t44.conf.in b/test/t44.conf.in index 11ca841c..dcb68716 100644 --- a/test/t44.conf.in +++ b/test/t44.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/ilom.dev" +include "@top_srcdir@/etc/devices/ilom.dev" device "d0" "ilom" "@top_builddir@/test/ilom -p ssh|&" device "d1" "ilom" "@top_builddir@/test/ilom -p serial|&" device "d2" "ilom" "@top_builddir@/test/ilom -p serial_loggedin|&" diff --git a/test/t46.conf.in b/test/t46.conf.in index 21669634..1c8a9fd2 100644 --- a/test/t46.conf.in +++ b/test/t46.conf.in @@ -1,7 +1,7 @@ -include "@top_srcdir@/etc/cyclades-pm8.dev" -include "@top_srcdir@/etc/cyclades-pm10.dev" -include "@top_srcdir@/etc/cyclades-pm20.dev" -include "@top_srcdir@/etc/cyclades-pm42.dev" +include "@top_srcdir@/etc/devices/cyclades-pm8.dev" +include "@top_srcdir@/etc/devices/cyclades-pm10.dev" +include "@top_srcdir@/etc/devices/cyclades-pm20.dev" +include "@top_srcdir@/etc/devices/cyclades-pm42.dev" device "d0" "pm8" "@top_builddir@/test/cyclades -p pm8|&" device "d1" "pm10" "@top_builddir@/test/cyclades -p pm10|&" device "d2" "pm42" "@top_builddir@/test/cyclades -p pm42|&" diff --git a/test/t47.conf.in b/test/t47.conf.in index ea929d42..e4bc4e22 100644 --- a/test/t47.conf.in +++ b/test/t47.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/ipmipower.dev" +include "@top_srcdir@/etc/devices/ipmipower.dev" device "d0" "ipmipower" "@top_builddir@/test/ipmipower -h t[0-15]|&" node "t[0-15]" "d0" diff --git a/test/t48.conf.in b/test/t48.conf.in index f2f1bdaf..04aa1bf9 100644 --- a/test/t48.conf.in +++ b/test/t48.conf.in @@ -1,5 +1,5 @@ listen "127.0.0.1:10103" -include "@top_srcdir@/etc/vpc.dev" +include "@top_srcdir@/etc/devices/vpc.dev" device "test0" "vpc" "127.0.0.1:10102" node "t[0-15]" "test0" diff --git a/test/t49.conf.in b/test/t49.conf.in index 1c7e66b2..0d0a4bf6 100644 --- a/test/t49.conf.in +++ b/test/t49.conf.in @@ -1,5 +1,5 @@ listen "0.0.0.0:10104" -include "@top_srcdir@/etc/vpc.dev" +include "@top_srcdir@/etc/devices/vpc.dev" device "test0" "vpc" "@top_builddir@/test/vpcd |&" node "t[0-15]" "test0" diff --git a/test/t50.conf.in b/test/t50.conf.in index fc82baf7..27736c99 100644 --- a/test/t50.conf.in +++ b/test/t50.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/bashfun.dev" +include "@top_srcdir@/etc/devices/bashfun.dev" device "bf0" "bashfun" "/bin/bash |&" node "t1" "bf0" "1" diff --git a/test/t51.conf.in b/test/t51.conf.in index 49034808..fb5b6eda 100644 --- a/test/t51.conf.in +++ b/test/t51.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/lom.dev" +include "@top_srcdir@/etc/devices/lom.dev" device "d0" "lom" "@top_builddir@/test/lom -p ssh|&" device "d1" "lom" "@top_builddir@/test//lom -p serial|&" device "d2" "lom" "@top_builddir@/test//lom -p serial_loggedin|&" diff --git a/test/t53.conf.in b/test/t53.conf.in index 50ad131d..e998ec58 100644 --- a/test/t53.conf.in +++ b/test/t53.conf.in @@ -1,4 +1,4 @@ # comment -include "@top_srcdir@/etc/vpc.dev" +include "@top_srcdir@/etc/devices/vpc.dev" # comment include "@top_srcdir@/test/t53.dev" diff --git a/test/t54.conf.in b/test/t54.conf.in index 19c3dc15..8fe0f375 100644 --- a/test/t54.conf.in +++ b/test/t54.conf.in @@ -1,5 +1,5 @@ # issue 34 (google code) -include "@top_srcdir@/etc/vpc.dev" +include "@top_srcdir@/etc/devices/vpc.dev" device "linkfarm" "vpc" "@top_builddir@/test/vpcd |&" device "mds" "vpc" "@top_builddir@/test/vpcd |&" diff --git a/test/t55.conf.in b/test/t55.conf.in index c81dcb01..5118cbb1 100644 --- a/test/t55.conf.in +++ b/test/t55.conf.in @@ -1,5 +1,5 @@ # issue 35 (google code) -include "@top_srcdir@/etc/vpc.dev" +include "@top_srcdir@/etc/devices/vpc.dev" device "pdu1" "vpc" "@top_builddir@/test/vpcd |&" diff --git a/test/t60.conf.in b/test/t60.conf.in index 7f683c89..ccb25894 100644 --- a/test/t60.conf.in +++ b/test/t60.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/ipmipower.dev" +include "@top_srcdir@/etc/devices/ipmipower.dev" device "d0" "ipmipower" "@top_builddir@/test/ipmipower --auth-failure -h t[0-15]|&" node "t[0-15]" "d0" diff --git a/test/t61.conf.in b/test/t61.conf.in index acd24df2..779a44e5 100644 --- a/test/t61.conf.in +++ b/test/t61.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/openbmc.dev" +include "@top_srcdir@/etc/devices/openbmc.dev" device "b0" "openbmc" "@top_builddir@/test/openbmc-httppower |&" device "b1" "openbmc" "@top_builddir@/test/openbmc-httppower |&" diff --git a/test/t62.conf.in b/test/t62.conf.in index 940677b8..17e34360 100644 --- a/test/t62.conf.in +++ b/test/t62.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/redfish.dev" +include "@top_srcdir@/etc/devices/redfish.dev" device "b0" "redfish" "@top_builddir@/test/redfish-httppower |&" device "b1" "redfish" "@top_builddir@/test/redfish-httppower |&" diff --git a/test/t63.conf.in b/test/t63.conf.in index 2a081b3c..2016d085 100644 --- a/test/t63.conf.in +++ b/test/t63.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/redfishpower-cray-r272z30.dev" +include "@top_srcdir@/etc/devices/redfishpower-cray-r272z30.dev" device "d0" "redfishpower-cray-r272z30" "@top_builddir@/test/redfishpower -h t[0-15]|&" node "t[0-15]" "d0" diff --git a/test/test.conf.in b/test/test.conf.in index 17edfff2..84f459bd 100644 --- a/test/test.conf.in +++ b/test/test.conf.in @@ -1,3 +1,3 @@ -include "@top_srcdir@/etc/vpc.dev" +include "@top_srcdir@/etc/devices/vpc.dev" device "test0" "vpc" "@top_builddir@/test/vpcd |&" node "t[0-15]" "test0" diff --git a/test/test4.conf.in b/test/test4.conf.in index 4696bf5a..1c01920d 100644 --- a/test/test4.conf.in +++ b/test/test4.conf.in @@ -1,4 +1,4 @@ -include "@top_srcdir@/etc/vpc.dev" +include "@top_srcdir@/etc/devices/vpc.dev" device "test0" "vpc" "@top_builddir@/test/vpcd |&" device "test1" "vpc" "@top_builddir@/test/vpcd |&" device "test2" "vpc" "@top_builddir@/test/vpcd |&" From 295c65f10eec0a23110a0995cb5cbe0b22c5ddf0 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Thu, 25 Jan 2024 06:07:10 -0800 Subject: [PATCH 3/4] etc: move systemd config to etc Problem: the systemd config is in the script directory, a vestige from sysvinit scripts days. These are config files not scripts, so move them to etc. --- Makefile.am | 1 - configure.ac | 5 ++--- etc/Makefile.am | 6 ++++++ {scripts => etc}/powerman.service.in | 0 {scripts => etc}/tmpfiles.d/powerman.conf.in | 0 scripts/Makefile.am | 5 ----- 6 files changed, 8 insertions(+), 9 deletions(-) rename {scripts => etc}/powerman.service.in (100%) rename {scripts => etc}/tmpfiles.d/powerman.conf.in (100%) delete mode 100644 scripts/Makefile.am diff --git a/Makefile.am b/Makefile.am index f3a86f88..695e36d7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,6 @@ SUBDIRS = \ etc \ man \ - scripts \ heartbeat \ src \ test diff --git a/configure.ac b/configure.ac index 1cf2ae69..4d24ff15 100644 --- a/configure.ac +++ b/configure.ac @@ -128,9 +128,8 @@ AC_CONFIG_FILES( \ src/snmppower/Makefile \ src/plmpower/Makefile \ etc/Makefile \ - scripts/Makefile \ - scripts/powerman.service \ - scripts/tmpfiles.d/powerman.conf \ + etc/powerman.service \ + etc/tmpfiles.d/powerman.conf \ heartbeat/Makefile \ man/Makefile \ man/powerman.1 \ diff --git a/etc/Makefile.am b/etc/Makefile.am index 17b3a413..cbb5a97a 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -1,3 +1,9 @@ +if HAVE_SYSTEMD +systemdsystemunit_DATA = powerman.service +systemdtmpdir_ddir = ${prefix}/lib/tmpfiles.d +systemdtmpdir_d_DATA = tmpfiles.d/powerman.conf +endif + pkgsysconfdir = $(sysconfdir)/powerman pkgsysconf_DATA = \ diff --git a/scripts/powerman.service.in b/etc/powerman.service.in similarity index 100% rename from scripts/powerman.service.in rename to etc/powerman.service.in diff --git a/scripts/tmpfiles.d/powerman.conf.in b/etc/tmpfiles.d/powerman.conf.in similarity index 100% rename from scripts/tmpfiles.d/powerman.conf.in rename to etc/tmpfiles.d/powerman.conf.in diff --git a/scripts/Makefile.am b/scripts/Makefile.am deleted file mode 100644 index 419a2a89..00000000 --- a/scripts/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -if HAVE_SYSTEMD -systemdsystemunit_DATA = powerman.service -systemdtmpdir_ddir = ${prefix}/lib/tmpfiles.d -systemdtmpdir_d_DATA = tmpfiles.d/powerman.conf -endif From a151869251327f17a0d3ce912c655cf8aee22735 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Thu, 25 Jan 2024 06:39:20 -0800 Subject: [PATCH 4/4] etc: relocate libpowerman.pc to etc Problem: libpowerman.pc is in the source directory but it belongs in etc with other config files. Move to etc. --- configure.ac | 2 +- etc/Makefile.am | 4 ++++ {src/powerman => etc}/libpowerman.pc.in | 0 src/powerman/Makefile.am | 4 ---- 4 files changed, 5 insertions(+), 5 deletions(-) rename {src/powerman => etc}/libpowerman.pc.in (100%) diff --git a/configure.ac b/configure.ac index 4d24ff15..7e61d974 100644 --- a/configure.ac +++ b/configure.ac @@ -119,7 +119,6 @@ AC_CONFIG_FILES( \ Makefile \ examples/powerman_el72.spec \ src/Makefile \ - src/powerman/libpowerman.pc \ src/liblsd/Makefile \ src/libcommon/Makefile \ src/powerman/Makefile \ @@ -128,6 +127,7 @@ AC_CONFIG_FILES( \ src/snmppower/Makefile \ src/plmpower/Makefile \ etc/Makefile \ + etc/libpowerman.pc \ etc/powerman.service \ etc/tmpfiles.d/powerman.conf \ heartbeat/Makefile \ diff --git a/etc/Makefile.am b/etc/Makefile.am index cbb5a97a..e7bda65c 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -4,6 +4,10 @@ systemdtmpdir_ddir = ${prefix}/lib/tmpfiles.d systemdtmpdir_d_DATA = tmpfiles.d/powerman.conf endif +if WITH_PKG_CONFIG +pkgconfig_DATA = libpowerman.pc +endif + pkgsysconfdir = $(sysconfdir)/powerman pkgsysconf_DATA = \ diff --git a/src/powerman/libpowerman.pc.in b/etc/libpowerman.pc.in similarity index 100% rename from src/powerman/libpowerman.pc.in rename to etc/libpowerman.pc.in diff --git a/src/powerman/Makefile.am b/src/powerman/Makefile.am index c39e52e5..0f58a28e 100644 --- a/src/powerman/Makefile.am +++ b/src/powerman/Makefile.am @@ -70,7 +70,3 @@ CLEANFILES = \ libpowerman_la_SOURCES = \ libpowerman.c - -if WITH_PKG_CONFIG -pkgconfig_DATA = libpowerman.pc -endif