Skip to content

Commit

Permalink
zipl: ship a minimal zipl.conf
Browse files Browse the repository at this point in the history
Ship a minimal zipl configuration file at /lib/s390-tools/zipl.conf by
default which would help systems using BLS files, without having to
create the traditional /etc/zipl.conf file.

Fixes: #70

Signed-off-by: Tuan Hoang <[email protected]>
  • Loading branch information
tuan-hoang1 committed Oct 1, 2019
1 parent 7276b89 commit b975a9b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
1 change: 1 addition & 0 deletions zipl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ all:
install: all
$(MAKE) -C src install
$(MAKE) -C man install
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 doc/zipl.conf.minimal $(DESTDIR)$(TOOLS_LIBDIR)/zipl.conf

clean:
$(MAKE) -C src clean
Expand Down
10 changes: 10 additions & 0 deletions zipl/doc/zipl.conf.minimal
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This is an example of a minimal zipl.conf file that can be used when the
# sections are defined in BootLoaderSpec fragments files.
#
# See the zipl and zipl.conf man page for more details.
[defaultboot]
defaultauto
prompt=1
timeout=5
secure=auto
target=/boot
10 changes: 8 additions & 2 deletions zipl/man/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ all:
install:
$(INSTALL) -d -m 755 $(DESTDIR)$(MANDIR)/man5
$(INSTALL) -d -m 755 $(DESTDIR)$(MANDIR)/man8
$(INSTALL) -m 644 -c zipl.8 $(DESTDIR)$(MANDIR)/man8
$(INSTALL) -m 644 -c zipl.conf.5 $(DESTDIR)$(MANDIR)/man5
sed -e 's@%SYSCONFDIR%@$(SYSCONFDIR)@' \
-e 's@%TOOLS_LIBDIR%@$(TOOLS_LIBDIR)@' zipl.8.in \
> $(DESTDIR)$(MANDIR)/man8/zipl.8
sed -e 's@%SYSCONFDIR%@$(SYSCONFDIR)@' \
-e 's@%TOOLS_LIBDIR%@$(TOOLS_LIBDIR)@' zipl.conf.5.in \
> $(DESTDIR)$(MANDIR)/man5/zipl.conf.5
chmod 644 $(DESTDIR)$(MANDIR)/man8/zipl.8 \
$(DESTDIR)$(MANDIR)/man5/zipl.conf.5

clean:
2 changes: 1 addition & 1 deletion zipl/man/zipl.8 → zipl/man/zipl.8.in
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Print version information, then exit.
.TP
.BR "\-c <CONFIG FILE>" " or " "\-\-config=<CONFIG FILE>"
Use the specified <CONFIG FILE>. If none is supplied, the environment
variable ZIPLCONF is evaluated if set, otherwise /etc/zipl.conf is used.
variable ZIPLCONF is evaluated if set, otherwise %SYSCONFDIR%/zipl.conf is used.

.TP
.BR "\-b <BLS DIRECTORY>" " or " "\-\-blsdir=<BLS DIRECTORY>"
Expand Down
17 changes: 14 additions & 3 deletions zipl/man/zipl.conf.5 → zipl/man/zipl.conf.5.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ boot loader tool
.BR zipl (8)).
.br

By default this configuration file is located at /etc/zipl.conf. A different
location may be specified either using the '\-\-config' option of
By default
.B zipl
checks for
.I zipl.conf
at /run/zipl/zipl.conf, %SYSCONFDIR%/zipl.conf, %TOOLS_LIBDIR%/zipl.conf in that
order - whichever is found first will be used. Users can specifically choose a
location using the '\-\-config' option of
.B zipl
or by setting the ZIPLCONF shell environment variable.
.br
Expand Down Expand Up @@ -138,7 +143,13 @@ initrd /initramfs-4.15.9
options root=/dev/dasda1 console=ttyS0
.PP

The location of the linux and initrd has to be specified relative to the boot partition. The BLS config files are only used to specify the IPL sections, a zipl.conf configuration files is still needed for global parameters.
The location of the linux and initrd has to be specified relative to the boot
partition. The BLS config files are only used to specify the IPL sections, a
zipl.conf configuration file is still needed for global parameters. For this
purpose, a minimal zipl.conf configuration file is shipped at
/lib/s390-tools/zipl.conf which would help when used with BLS config files, by
not requiring users to create the traditional configuration file at
%SYSCONFDIR%/zipl.conf.

.B Boot menu

Expand Down

0 comments on commit b975a9b

Please sign in to comment.