summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-08-21 05:48:34 +0000
committerdg <dg@FreeBSD.org>1994-08-21 05:48:34 +0000
commit2c49a7e8c78f68ab5d37e39803447ddacda434c2 (patch)
treedcd47489a244fc193eb4bd4dfa9ce1b2fde9b4d2 /sbin
parent743dba06ce06157ddf2a0e17aa508e3812cf4c25 (diff)
downloadFreeBSD-src-2c49a7e8c78f68ab5d37e39803447ddacda434c2.zip
FreeBSD-src-2c49a7e8c78f68ab5d37e39803447ddacda434c2.tar.gz
Install aliases "fasthalt" and "fastboot" for halt and boot respectively.
This is for "backwards compatibility". Documented these aliases in the manual page.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/reboot/Makefile5
-rw-r--r--sbin/reboot/reboot.814
-rw-r--r--sbin/reboot/reboot.c2
3 files changed, 18 insertions, 3 deletions
diff --git a/sbin/reboot/Makefile b/sbin/reboot/Makefile
index 7dd2e90..a790be7 100644
--- a/sbin/reboot/Makefile
+++ b/sbin/reboot/Makefile
@@ -4,8 +4,9 @@ PROG= reboot
DPADD= ${LIBUTIL}
LDADD= -lutil
MAN8= reboot.8 boot_hp300.8 boot_i386.8 boot_sparc.8 boot_tahoe.8 boot_vax.8
-MLINKS= reboot.8 halt.8
-LINKS= ${BINDIR}/reboot ${BINDIR}/halt
+MLINKS= reboot.8 halt.8 reboot.8 fastboot.8 reboot.8 fasthalt.8
+LINKS= ${BINDIR}/reboot ${BINDIR}/halt ${BINDIR}/reboot ${BINDIR}/fastboot \
+ ${BINDIR}/reboot ${BINDIR}/fasthalt
XXXBROKENafterinstall:
${MINSTALL} boot_hp300.8 ${DESTDIR}${MANDIR}8/hp300/boot.8
diff --git a/sbin/reboot/reboot.8 b/sbin/reboot/reboot.8
index 2fd2abb..03f372e 100644
--- a/sbin/reboot/reboot.8
+++ b/sbin/reboot/reboot.8
@@ -44,6 +44,10 @@ stopping and restarting the system
.Op Fl nq
.Nm reboot
.Op Fl nq
+.Nm fasthalt
+.Op Fl nq
+.Nm fastboot
+.Op Fl nq
.Sh DESCRIPTION
The
.Nm halt
@@ -72,6 +76,16 @@ the flushing of the file system cache is performed.
This option should probably not be used.
.El
.Pp
+The
+.Nm fasthalt
+and
+.Nm fastboot
+utilities are nothing more than aliases for the
+.Nm halt
+and
+.Nm reboot
+utilities.
+.Pp
Normally, the
.Xr shutdown 8
utility is used when the system needs to be halted or restarted, giving
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c
index df5515a..6d0fee4 100644
--- a/sbin/reboot/reboot.c
+++ b/sbin/reboot/reboot.c
@@ -66,7 +66,7 @@ main(argc, argv)
int ch, howto, lflag, nflag, qflag, sverrno;
char *p, *user;
- if (!strcmp((p = rindex(*argv, '/')) ? p + 1 : *argv, "halt")) {
+ if (strstr((p = rindex(*argv, '/')) ? p + 1 : *argv, "halt")) {
dohalt = 1;
howto = RB_HALT;
} else
OpenPOWER on IntegriCloud