summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-01-07 18:08:08 -0200
committerRenato Botelho <renato@netgate.com>2016-01-07 18:08:08 -0200
commit7a579754077b3460c9509c75cdd1b78769c1db3f (patch)
treec15015685ccb82b7db1ac19d663a3c6e41e64587 /sbin
parentd8ff3484131f428fcc0727cd504acb5050a36490 (diff)
parentbc6ee646001a22150936ff06bf11cd08195e208d (diff)
downloadFreeBSD-src-7a579754077b3460c9509c75cdd1b78769c1db3f.zip
FreeBSD-src-7a579754077b3460c9509c75cdd1b78769c1db3f.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sbin')
-rw-r--r--sbin/devd/devd.cc2
-rw-r--r--sbin/fsck_ffs/fsck.h2
-rw-r--r--sbin/fsck_ffs/globs.c2
-rw-r--r--sbin/natd/natd.c2
-rw-r--r--sbin/newfs_nandfs/newfs_nandfs.c2
-rw-r--r--sbin/rcorder/rcorder.c4
-rw-r--r--sbin/reboot/reboot.819
-rw-r--r--sbin/reboot/reboot.c12
-rw-r--r--sbin/route/route.c3
9 files changed, 34 insertions, 14 deletions
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc
index 9c46453..a0cb037 100644
--- a/sbin/devd/devd.cc
+++ b/sbin/devd/devd.cc
@@ -850,7 +850,7 @@ create_socket(const char *name, int socktype)
return (fd);
}
-unsigned int max_clients = 10; /* Default, can be overriden on cmdline. */
+unsigned int max_clients = 10; /* Default, can be overridden on cmdline. */
unsigned int num_clients;
list<client_t> clients;
diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h
index c0ec651..57e0773 100644
--- a/sbin/fsck_ffs/fsck.h
+++ b/sbin/fsck_ffs/fsck.h
@@ -301,7 +301,7 @@ extern char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */
extern char *cdevname; /* name of device being checked */
extern long dev_bsize; /* computed value of DEV_BSIZE */
extern long secsize; /* actual disk sector size */
-extern u_int real_dev_bsize; /* actual disk sector size, not overriden */
+extern u_int real_dev_bsize; /* actual disk sector size, not overridden */
extern char nflag; /* assume a no response */
extern char yflag; /* assume a yes response */
extern int bkgrdflag; /* use a snapshot to run on an active system */
diff --git a/sbin/fsck_ffs/globs.c b/sbin/fsck_ffs/globs.c
index c5b1e1b..e910bc9 100644
--- a/sbin/fsck_ffs/globs.c
+++ b/sbin/fsck_ffs/globs.c
@@ -73,7 +73,7 @@ char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */
char *cdevname; /* name of device being checked */
long dev_bsize; /* computed value of DEV_BSIZE */
long secsize; /* actual disk sector size */
-u_int real_dev_bsize; /* actual disk sector size, not overriden */
+u_int real_dev_bsize; /* actual disk sector size, not overridden */
char nflag; /* assume a no response */
char yflag; /* assume a yes response */
int bkgrdflag; /* use a snapshot to run on an active system */
diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c
index 959e1ee..1215351 100644
--- a/sbin/natd/natd.c
+++ b/sbin/natd/natd.c
@@ -223,7 +223,7 @@ int main (int argc, char** argv)
/*
* Create divert sockets. Use only one socket if -p was specified
* on command line. Otherwise, create separate sockets for
- * outgoing and incoming connnections.
+ * outgoing and incoming connections.
*/
if (mip->inOutPort) {
diff --git a/sbin/newfs_nandfs/newfs_nandfs.c b/sbin/newfs_nandfs/newfs_nandfs.c
index 3990dbb..9500805 100644
--- a/sbin/newfs_nandfs/newfs_nandfs.c
+++ b/sbin/newfs_nandfs/newfs_nandfs.c
@@ -1088,7 +1088,7 @@ static void
print_summary(void)
{
- printf("filesystem created succesfully\n");
+ printf("filesystem was created successfully\n");
printf("total segments: %#jx valid segments: %#jx\n", nsegments,
nsegments - bad_segments_count);
printf("total space: %ju MB free: %ju MB\n",
diff --git a/sbin/rcorder/rcorder.c b/sbin/rcorder/rcorder.c
index 8c46b4f..1d10a40 100644
--- a/sbin/rcorder/rcorder.c
+++ b/sbin/rcorder/rcorder.c
@@ -220,7 +220,7 @@ strnode_add(strnodelist **listp, char *s, filenode *fnode)
/*
* below are the functions that deal with creating the lists
- * from the filename's given and the dependancies and provisions
+ * from the filename's given dependencies and provisions
* in each of these files. no ordering or checking is done here.
*/
@@ -696,7 +696,7 @@ keep_ok(filenode *fnode)
*
* NOTE: do_file() is called recursively from several places and cannot
* safely free() anything related to items that may be recursed on.
- * Circular dependancies will cause problems if we do.
+ * Circular dependencies will cause problems if we do.
*/
static void
do_file(filenode *fnode)
diff --git a/sbin/reboot/reboot.8 b/sbin/reboot/reboot.8
index 13d7098..84dd887 100644
--- a/sbin/reboot/reboot.8
+++ b/sbin/reboot/reboot.8
@@ -29,6 +29,7 @@
.\" $FreeBSD$
.\"
.Dd October 11, 2010
+.Dd Jan 06, 2016
.Dt REBOOT 8
.Os
.Sh NAME
@@ -39,16 +40,16 @@
.Nd stopping and restarting the system
.Sh SYNOPSIS
.Nm halt
-.Op Fl lnpq
+.Op Fl lNnpq
.Op Fl k Ar kernel
.Nm
-.Op Fl dlnpq
+.Op Fl dlNnpq
.Op Fl k Ar kernel
.Nm fasthalt
-.Op Fl lnpq
+.Op Fl lNnpq
.Op Fl k Ar kernel
.Nm fastboot
-.Op Fl dlnpq
+.Op Fl dlNnpq
.Op Fl k Ar kernel
.Sh DESCRIPTION
The
@@ -94,6 +95,16 @@ that call
or
.Nm halt
and log this themselves.
+.It Fl N
+The file system cache is not flushed during the initial process clean-up,
+however the kernel level
+.Xr reboot 2
+is still processed with a sync.
+This option can be useful for performing a
+.Dq best-effort
+reboot when devices might be unavailable.
+This can happen when devices have been disconnected, such as with
+.Xr iscsi 4 .
.It Fl n
The file system cache is not flushed.
This option should probably not be used.
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c
index d927db0..6d590ac 100644
--- a/sbin/reboot/reboot.c
+++ b/sbin/reboot/reboot.c
@@ -67,7 +67,7 @@ main(int argc, char *argv[])
{
struct utmpx utx;
const struct passwd *pw;
- int ch, howto, i, fd, lflag, nflag, qflag, sverrno;
+ int ch, howto, i, fd, lflag, nflag, qflag, sverrno, Nflag;
u_int pageins;
const char *user, *kernel = NULL;
@@ -76,8 +76,8 @@ main(int argc, char *argv[])
howto = RB_HALT;
} else
howto = 0;
- lflag = nflag = qflag = 0;
- while ((ch = getopt(argc, argv, "dk:lnpq")) != -1)
+ lflag = nflag = qflag = Nflag = 0;
+ while ((ch = getopt(argc, argv, "dk:lNnpq")) != -1)
switch(ch) {
case 'd':
howto |= RB_DUMP;
@@ -92,6 +92,10 @@ main(int argc, char *argv[])
nflag = 1;
howto |= RB_NOSYNC;
break;
+ case 'N':
+ nflag = 1;
+ Nflag = 1;
+ break;
case 'p':
howto |= RB_POWEROFF;
break;
@@ -107,6 +111,8 @@ main(int argc, char *argv[])
if ((howto & (RB_DUMP | RB_HALT)) == (RB_DUMP | RB_HALT))
errx(1, "cannot dump (-d) when halting; must reboot instead");
+ if (Nflag && (howto & RB_NOSYNC) != 0)
+ errx(1, "-N cannot be used with -n");
if (geteuid()) {
errno = EPERM;
err(1, NULL);
diff --git a/sbin/route/route.c b/sbin/route/route.c
index b3641ac..6f73ded 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1239,6 +1239,9 @@ getaddr(int idx, char *str, struct hostent **hpp, int nrflags)
freeifaddrs(ifap);
if (sdl != NULL)
return(1);
+ else
+ errx(EX_DATAERR,
+ "interface '%s' does not exist", str);
}
break;
case RTAX_IFP:
OpenPOWER on IntegriCloud