From 2c49a7e8c78f68ab5d37e39803447ddacda434c2 Mon Sep 17 00:00:00 2001 From: dg Date: Sun, 21 Aug 1994 05:48:34 +0000 Subject: Install aliases "fasthalt" and "fastboot" for halt and boot respectively. This is for "backwards compatibility". Documented these aliases in the manual page. --- sbin/reboot/Makefile | 5 +++-- sbin/reboot/reboot.8 | 14 ++++++++++++++ sbin/reboot/reboot.c | 2 +- 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 -- cgit v1.1