Browse Source

provide "poweroff" compatibility symlink

This is called by e.g. `elogind` on `loginctl poweroff` so we
need the symlink for that to work.
Daniel Kolesa 2 years ago
parent
commit
59b9d04907
3 changed files with 11 additions and 6 deletions
  1. 1 0
      doc/manpages/Makefile
  2. 9 6
      doc/manpages/shutdown.8.m4
  3. 1 0
      src/Makefile

+ 1 - 0
doc/manpages/Makefile

@@ -14,6 +14,7 @@ ifeq ($(BUILD_SHUTDOWN),yes)
 	install -m644 shutdown.8 "$(DESTDIR)$(MANDIR)/man8"
 	ln -sf "shutdown.8" "$(DESTDIR)$(MANDIR)/man8/halt.8"
 	ln -sf "shutdown.8" "$(DESTDIR)$(MANDIR)/man8/reboot.8"
+	ln -sf "shutdown.8" "$(DESTDIR)$(MANDIR)/man8/poweroff.8"
 endif
 
 clean:

+ 9 - 6
doc/manpages/shutdown.8.m4

@@ -1,7 +1,7 @@
 changequote(`@@@',`$$$')dnl
 @@@.TH SHUTDOWN "8" "$$$MONTH YEAR@@@" "Dinit $$$VERSION@@@" "Dinit \- service management system"
 .SH NAME
-shutdown, halt, reboot \- system shutdown 
+shutdown, halt, poweroff, reboot \- system shutdown 
 .\"
 .SH SYNOPSIS
 .\"
@@ -11,6 +11,8 @@ shutdown, halt, reboot \- system shutdown
 .br
 \fBhalt\fR [\fIoptions...\fR]
 .br
+\fBpoweroff\fR [\fIoptions...\fR]
+.br
 \fBreboot\fR [\fIoptions...\fR]
 .\"
 .SH DESCRIPTION
@@ -18,13 +20,14 @@ shutdown, halt, reboot \- system shutdown
 This manual page is for the shutdown utility included with the \fBDinit\fR
 service manager package. See \fBdinit\fR(8).
 
-The shutdown, reboot and halt commands can be used to instruct the service
-manager daemon to perform a service rollback and then to shutdown the
+The shutdown, reboot, poweroff and halt commands can be used to instruct the
+service manager daemon to perform a service rollback and then to shutdown the
 system. They can also perform shutdown directly, without service rollback.
 
-Note that for consistency with other packages a "halt" alias is provided,
-however it has no special significance. The default action is to power down
-the system if called as either "shutdown" or "halt".
+Note that for consistency with other packages "halt" and "poweroff" aliases
+are provided, however they have no special significance. The default action
+is to power down the system if called as either "shutdown", "halt", or
+"poweroff".
 .\"
 .SH OPTIONS
 .TP

+ 1 - 0
src/Makefile

@@ -60,6 +60,7 @@ install: all
 ifeq ($(BUILD_SHUTDOWN),yes)
 	ln -sf $(SHUTDOWN) $(DESTDIR)$(SBINDIR)/$(SHUTDOWNPREFIX)halt
 	ln -sf $(SHUTDOWN) $(DESTDIR)$(SBINDIR)/$(SHUTDOWNPREFIX)reboot
+	ln -sf $(SHUTDOWN) $(DESTDIR)$(SBINDIR)/$(SHUTDOWNPREFIX)poweroff
 endif
 
 clean: