Skip to content

Commit

Permalink
scripts/dumpconf: Bring installation rules in line with other scripts
Browse files Browse the repository at this point in the history
Until recently dumpconf might have been installed in two different
locations, /etc/init.d/ and /lib/s390-tools/. As dumpconf is now part of
the helper scripts in the scripts directory, extend the installation
rule and add the %S390_TOOLS_VERSION% wildcard to the script along the
way for correct version output.

The installation rule in the systemd/Makefile is removed, bringing it in
line with cpictl.

Acked-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
  • Loading branch information
hoeppnerj committed May 17, 2022
1 parent a177ae2 commit b01ef78
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
14 changes: 10 additions & 4 deletions scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ include ../common.mak

SCRIPTS = dbginfo.sh zfcpdbf zipl-switch-to-blscfg scsi_logging_level
SCRIPTS += sclpdbf
# Helper scripts controlled by corresponding systemd services
SD_HELPER_SCRIPTS = cpictl dumpconf
MAN_PAGES = dbginfo.sh.1 zfcpdbf.1 zipl-switch-to-blscfg.1

all:
Expand All @@ -17,10 +19,14 @@ install:
chmod 755 $(DESTDIR)$(BINDIR)/$$i; \
done

sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' cpictl > \
$(DESTDIR)$(TOOLS_LIBDIR)/cpictl
chown $(OWNER):$(GROUP) $(DESTDIR)$(TOOLS_LIBDIR)/cpictl
chmod 755 $(DESTDIR)$(TOOLS_LIBDIR)/cpictl
@for i in $(SD_HELPER_SCRIPTS); \
do \
cat $$i | \
sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
>$(DESTDIR)$(TOOLS_LIBDIR)/$$i; \
chown $(OWNER):$(GROUP) $(DESTDIR)$(TOOLS_LIBDIR)/$$i; \
chmod 755 $(DESTDIR)$(TOOLS_LIBDIR)/$$i; \
done

@for i in $(MAN_PAGES); \
do \
Expand Down
2 changes: 1 addition & 1 deletion scripts/dumpconf
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ EOF
printversion()
{
cat <<EOF
dumpconf: zSeries dump configuration script version 1.1
dumpconf: zSeries dump configuration script version %S390_TOOLS_VERSION%
Copyright IBM Corp. 2006, 2022
EOF
}
Expand Down
2 changes: 0 additions & 2 deletions systemd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ install: system_units
$(INSTALL) -g $(GROUP) -o $(OWNER) \
-m 644 $$unit $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR) ; \
done
# For systemd install dumpconf to TOOLS_LIBDIR
$(INSTALL) -m 755 ../scripts/dumpconf $(DESTDIR)$(TOOLS_LIBDIR)

else

Expand Down

0 comments on commit b01ef78

Please sign in to comment.