]> Zhao Yanbai Git Server - minix.git/commitdiff
Import NetBSD true and false commands
authorZachary Storer <zacts.3.14159@gmail.com>
Sat, 22 Feb 2014 20:20:45 +0000 (13:20 -0700)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:05:09 +0000 (17:05 +0200)
Replaces the 'true' and 'false' functionality provided by commands/true
and commands/false.

Change-Id: I736efb9a650f3154eb21e442d676a0f5d2dee957

19 files changed:
benchmarks/unixbench-5.1.2/src/syscall.c
commands/Makefile
commands/false/Makefile [deleted file]
commands/false/false.sh [deleted symlink]
commands/shared/README
commands/true/Makefile [deleted file]
commands/true/true.sh [deleted symlink]
distrib/sets/lists/minix/mi
etc/master.passwd
man/man1/Makefile
man/man1/true.1 [deleted file]
releasetools/nbsd_ports
usr.bin/Makefile
usr.bin/false/Makefile [new file with mode: 0644]
usr.bin/false/false.1 [new file with mode: 0644]
usr.bin/false/false.sh [new file with mode: 0644]
usr.bin/true/Makefile [new file with mode: 0644]
usr.bin/true/true.1 [new file with mode: 0644]
usr.bin/true/true.sh [new file with mode: 0644]

index d0238bdced629c6667e6537bdce737436940ff25..1c4076882ef5a447910cd723b32538621ab1c86d 100644 (file)
@@ -88,8 +88,8 @@ int main(int argc, char *argv[])
                     fprintf(stderr,"%s: fork failed\n", argv[0]);
                     exit(1);
                 } else if (pid == 0) {
-                    execl("/bin/true", (char *) 0);
-                    fprintf(stderr,"%s: exec /bin/true failed\n", argv[0]);
+                    execl("/usr/bin/true", (char *) 0);
+                    fprintf(stderr,"%s: exec /usr/bin/true failed\n", argv[0]);
                     exit(1);
                 } else {
                     if (waitpid(pid, NULL, 0) < 0) {
index 29579854d967b4430c553c480deb1962ab1742a9..99de1e54ba245e8214cc93337b3751e1e9e54ff6 100644 (file)
@@ -35,7 +35,7 @@ SUBDIR=       add_route arp ash at backup btrace \
        atnormalize dosread fdisk loadfont \
        autopart part partition playwave  \
        recwave repartition screendump \
-       command echo expr false getopts read test true \
+       command echo expr getopts read test \
                umask wait
 
 .if ${MACHINE_ARCH} == "earm"
diff --git a/commands/false/Makefile b/commands/false/Makefile
deleted file mode 100644 (file)
index a109e84..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-SCRIPTS= false.sh
-BINDIR=        /bin
-MAN=
-
-.include <bsd.prog.mk>
diff --git a/commands/false/false.sh b/commands/false/false.sh
deleted file mode 120000 (symlink)
index f9350d4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../shared/builtin.sh
\ No newline at end of file
index 246c4f7ff4efc2dcf64dd72e8563289b3cbbc75f..1a885d781ed840f9c00344c6f58210a28b39e376 100644 (file)
@@ -9,11 +9,9 @@ At this moment it is installed as the following commands:
 /bin/command
 /bin/echo
 /bin/expr
-/bin/false
 /bin/getopts
 /bin/read
 /bin/test
-/bin/true
 /bin/umask
 /bin/wait
 
diff --git a/commands/true/Makefile b/commands/true/Makefile
deleted file mode 100644 (file)
index 6c3b4da..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-SCRIPTS= true.sh
-BINDIR=        /bin
-MAN=
-
-.include <bsd.prog.mk>
diff --git a/commands/true/true.sh b/commands/true/true.sh
deleted file mode 120000 (symlink)
index f9350d4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../shared/builtin.sh
\ No newline at end of file
index 96d26bc0322bd3ddf84173692ce0794417bc2999..b5474148bfd571a64b5cc84a791f58d3dc318777 100644 (file)
@@ -22,7 +22,6 @@
 ./bin/echo                             minix-sys
 ./bin/ed                               minix-sys
 ./bin/expr                             minix-sys
-./bin/false                            minix-sys
 ./bin/getopts                          minix-sys
 ./bin/intr                             minix-sys
 ./bin/kill                             minix-sys
@@ -50,7 +49,6 @@
 ./bin/sysenv                           minix-sys
 ./bin/tar                              minix-sys
 ./bin/test                             minix-sys
-./bin/true                             minix-sys
 ./bin/umask                            minix-sys
 ./bin/umount                           minix-sys
 ./bin/updateboot                       minix-sys
 ./usr/bin/ex                           minix-sys
 ./usr/bin/expand                       minix-sys
 ./usr/bin/factor                       minix-sys
+./usr/bin/false                                minix-sys
 ./usr/bin/fbdctl                       minix-sys
 ./usr/bin/fdisk                                minix-sys
 ./usr/bin/fetch                                minix-sys
 ./usr/bin/touch                                minix-sys
 ./usr/bin/tput                         minix-sys
 ./usr/bin/tr                           minix-sys
+./usr/bin/true                         minix-sys
 ./usr/bin/truncate                     minix-sys
 ./usr/bin/tsort                                minix-sys
 ./usr/bin/ttn                          minix-sys
 ./usr/man/man1/export.1                        minix-sys
 ./usr/man/man1/expr.1                  minix-sys
 ./usr/man/man1/factor.1                        minix-sys
+./usr/man/man1/false.1                 minix-sys
 ./usr/man/man1/fetch.1                 minix-sys
 ./usr/man/man1/fgrep.1                 minix-sys
 ./usr/man/man1/file.1                  minix-sys
index 86fd414d6cd6a578504ba5374f08dfe319278589..c6307edff0e92789497aa0a5f3ca59613506301d 100644 (file)
@@ -11,7 +11,7 @@ server:*:11:11::0:0:OS Servers:/:/bin/sh
 service:*:12:12::0:0:System Services:/:/bin/sh
 sshd:*:22:22::0:0:sshd:/:/bin/sh
 smtpd:*:25:25::0:0:smtpd:/:/bin/sh
-postfix:*:27:27::0:0:postfix:/usr/var/spool/postfix:/bin/false
-postgres:*:30:30::0:0:postgresql:/:/bin/false
+postfix:*:27:27::0:0:postfix:/usr/var/spool/postfix:/usr/bin/false
+postgres:*:30:30::0:0:postgresql:/:/usr/bin/false
 games:*:9998:13::0:0:games:/:/bin/sh
 nobody:*:9999:39::0:0:Unprivileged user:/tmp:/bin/sh
index 4a7bdeaabeba654b996163474318acb7eec14842..394021eb9dd8f7b42d503142aef09d03a7b57db8 100644 (file)
@@ -18,7 +18,7 @@ MAN=  ash.1 at.1 \
        shar.1 sleep.1 spell.1 \
        svc.1 svrctl.1 \
        synctree.1 sysenv.1 sz.1 tail.1 telnet.1 template.1 \
-       term.1 termcap.1 tget.1 time.1 true.1 \
+       term.1 termcap.1 tget.1 time.1 \
        truncate.1 umount.1 \
        uud.1 uue.1 vol.1 whereis.1 which.1 \
        yap.1 linkfarm.1 pkg_view.1
diff --git a/man/man1/true.1 b/man/man1/true.1
deleted file mode 100644 (file)
index ab4b835..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-.TH TRUE 1
-.SH NAME
-true, false \- exit with the value true or false
-.SH SYNOPSIS
-\fBtrue\fR
-.br
-\fBfalse\fR
-.SH EXAMPLES
-.ta +20n
-.ft B
-.nf
-while true     \fR# List the directory until DEL is hit\fP
-do ls \-l
-done
-.fi
-.ft P
-.SH DESCRIPTION
-These commands return the value
-.I true
-or
-.I false .
-They are used for shell programming.
-.SH "SEE ALSO"
-.BR sh (1).
index 5f8671dcbdc5d744137024f2026a972be156f540..74478c986b80c51a5eca08129927c3413cfc4933 100644 (file)
 2013/12/1 12:00:00,usr.bin/du
 2013/12/1 12:00:00,usr.bin/expand
 2013/12/1 12:00:00,usr.bin/env
+2013/12/1 12:00:00,usr.bin/false
 2013/12/1 12:00:00,usr.bin/finger
 2013/12/1 12:00:00,usr.bin/fold
 2013/12/1 12:00:00,usr.bin/fpr
 2013/12/1 12:00:00,usr.bin/tic
 2013/12/1 12:00:00,usr.bin/tput
 2013/12/1 12:00:00,usr.bin/tr
+2013/12/1 12:00:00,usr.bin/true
 2013/12/1 12:00:00,usr.bin/tsort
 2013/12/1 12:00:00,usr.bin/tty
 2013/12/1 12:00:00,usr.bin/ul
index 7a53784d2244cc906a940756b2af365fb623f472..242e3a056820b6fe63e0bc7bf5a88be3d68523ad 100644 (file)
@@ -10,7 +10,7 @@ SUBDIR= asa \
        column comm csplit ctags cut \
        deroff dirname du \
        env expand \
-       finger fold fpr from \
+       false finger fold fpr from \
        fsplit ftp genassym getopt \
        head hexdump id indent infocmp join jot \
        lam last ldd leave \
@@ -26,7 +26,7 @@ SUBDIR= asa \
        sdiff sed seq shlock \
        shuffle  sort split stat su \
        tee tic tput \
-       tr tsort tty ul uname unexpand unifdef \
+       tr true tsort tty ul uname unexpand unifdef \
        uniq units unvis unzip users \
        uuidgen vis \
        \
diff --git a/usr.bin/false/Makefile b/usr.bin/false/Makefile
new file mode 100644 (file)
index 0000000..d3d4830
--- /dev/null
@@ -0,0 +1,7 @@
+#      $NetBSD: Makefile,v 1.9 1997/03/24 21:59:34 christos Exp $
+#      from: @(#)Makefile      5.3 (Berkeley) 5/11/90
+
+MAN=   false.1
+SCRIPTS=false.sh
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/false/false.1 b/usr.bin/false/false.1
new file mode 100644 (file)
index 0000000..175b67a
--- /dev/null
@@ -0,0 +1,56 @@
+.\"    $NetBSD: false.1,v 1.8 2003/08/07 11:13:40 agc Exp $
+.\"
+.\" Copyright (c) 1983, 1990 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" the Institute of Electrical and Electronics Engineers, Inc.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"    from: @(#)false.1       6.6 (Berkeley) 7/24/91
+.\"    $NetBSD: false.1,v 1.8 2003/08/07 11:13:40 agc Exp $
+.\"
+.Dd July 24, 1991
+.Dt FALSE 1
+.Os
+.Sh NAME
+.Nm false
+.Nd return false value
+.Sh SYNOPSIS
+.Nm
+.Sh DESCRIPTION
+The
+.Nm
+utility always exits with a nonzero exit code.
+.Sh SEE ALSO
+.Xr csh 1 ,
+.Xr sh 1 ,
+.Xr true 1
+.Sh STANDARDS
+The
+.Nm
+utility conforms to
+.St -p1003.2-92 .
diff --git a/usr.bin/false/false.sh b/usr.bin/false/false.sh
new file mode 100644 (file)
index 0000000..2526efb
--- /dev/null
@@ -0,0 +1,2 @@
+#! /bin/sh
+exit 1
diff --git a/usr.bin/true/Makefile b/usr.bin/true/Makefile
new file mode 100644 (file)
index 0000000..4fb2d7c
--- /dev/null
@@ -0,0 +1,7 @@
+#      $NetBSD: Makefile,v 1.9 1997/03/24 21:59:56 christos Exp $
+#      from: @(#)Makefile      5.3 (Berkeley) 5/11/90
+
+MAN=   true.1
+SCRIPTS=true.sh
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/true/true.1 b/usr.bin/true/true.1
new file mode 100644 (file)
index 0000000..5829560
--- /dev/null
@@ -0,0 +1,56 @@
+.\"    $NetBSD: true.1,v 1.7 2003/08/07 11:16:48 agc Exp $
+.\"
+.\" Copyright (c) 1983, 1985, 1990 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" the Institute of Electrical and Electronics Engineers, Inc.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"     from: @(#)true.1       6.4 (Berkeley) 6/27/91
+.\"    $NetBSD: true.1,v 1.7 2003/08/07 11:16:48 agc Exp $
+.\"
+.Dd June 27, 1991
+.Dt TRUE 1
+.Os
+.Sh NAME
+.Nm true
+.Nd return true value
+.Sh SYNOPSIS
+.Nm
+.Sh DESCRIPTION
+The
+.Nm
+utility always returns with exit code zero.
+.Sh SEE ALSO
+.Xr csh 1 ,
+.Xr false 1 ,
+.Xr sh 1
+.Sh STANDARDS
+The
+.Nm
+utility conforms to
+.St -p1003.2-92 .
diff --git a/usr.bin/true/true.sh b/usr.bin/true/true.sh
new file mode 100644 (file)
index 0000000..20f87ef
--- /dev/null
@@ -0,0 +1,2 @@
+#! /bin/sh
+exit 0