Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/sys_info + don't assume that tcsh is always installe...
details: https://anonhg.NetBSD.org/src/rev/6cab089c06e4
branches: trunk
changeset: 355870:6cab089c06e4
user: agc <agc%NetBSD.org@localhost>
date: Sat Aug 19 03:06:50 2017 +0000
description:
+ don't assume that tcsh is always installed, pointed out by jmcneill - thanks!
+ a "sys_info" invocation without any args is now the equivalent of sys_info -a,
just like pkg_info
diffstat:
usr.bin/sys_info/sys_info.sh | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 49b36bc3d49d -r 6cab089c06e4 usr.bin/sys_info/sys_info.sh
--- a/usr.bin/sys_info/sys_info.sh Fri Aug 18 21:45:25 2017 +0000
+++ b/usr.bin/sys_info/sys_info.sh Sat Aug 19 03:06:50 2017 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: sys_info.sh,v 1.1 2016/06/04 15:27:11 agc Exp $
+# $NetBSD: sys_info.sh,v 1.2 2017/08/19 03:06:50 agc Exp $
# Copyright (c) 2016 Alistair Crooks <agc%NetBSD.org@localhost>
# All rights reserved.
@@ -107,7 +107,7 @@
sshd -V 2>&1 | awk '/OpenSSH/ { sub("_", "D-", $1); print tolower($1) }'
;;
tcsh)
- tcsh -c 'echo $version' | awk '{ print $1 "-" $2 }'
+ grep '/tcsh' /etc/shells > /dev/null 2>&1 && tcsh -c 'echo $version' | awk '{ print $1 "-" $2 }'
;;
unbound)
case $(uname -s) in
@@ -122,7 +122,11 @@
esac
}
-all=false
+case $# in
+0) all=true ;;
+*) all=false ;;
+esac
+
while [ $# -gt 0 ]; do
case "$1" in
-a) all=true ;;
Home |
Main Index |
Thread Index |
Old Index