svn commit: r309830 - stable/10/bin/freebsd-version
Dag-Erling Smørgrav
des at FreeBSD.org
Sat Dec 10 20:24:23 UTC 2016
Author: des
Date: Sat Dec 10 20:24:22 2016
New Revision: 309830
URL: https://svnweb.freebsd.org/changeset/base/309830
Log:
MFH (r308297): use what(1) instead of strings(1).
PR: 213665
Submitted by: Pawel Worach <pawel.worach at gmail.com>
Modified:
stable/10/bin/freebsd-version/freebsd-version.sh.in
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/bin/freebsd-version/freebsd-version.sh.in
==============================================================================
--- stable/10/bin/freebsd-version/freebsd-version.sh.in Sat Dec 10 20:23:16 2016 (r309829)
+++ stable/10/bin/freebsd-version/freebsd-version.sh.in Sat Dec 10 20:24:22 2016 (r309830)
@@ -36,7 +36,7 @@ USERLAND_VERSION="@@REVISION@@-@@BRANCH@
: ${LOADER_CONF_FILES:=$LOADER_DIR/defaults/loader.conf $LOADER_DIR/loader.conf $LOADER_DIR/loader.conf.local}
LOADER_RE1='^\([A-Z_a-z][0-9A-Z_a-z]*=[-./0-9A-Z_a-z]\{1,\}\).*$'
LOADER_RE2='^\([A-Z_a-z][0-9A-Z_a-z]*="[-./0-9A-Z_a-z]\{1,\}"\).*$'
-KERNEL_RE='^@(#)@@TYPE@@ \([-.0-9A-Za-z]\{1,\}\) .*$'
+KERNEL_RE='^@@TYPE@@ \([-.0-9A-Za-z]\{1,\}\) .*$'
progname=$(basename $0)
@@ -67,7 +67,7 @@ kernel_version() {
if [ ! -f "$kernfile" -o ! -r "$kernfile" ] ; then
error "unable to locate kernel"
fi
- strings "$kernfile" | sed -n "s/$KERNEL_RE/\\1/p"
+ what -qs "$kernfile" | sed -n "s/$KERNEL_RE/\\1/p"
}
#
More information about the svn-src-stable
mailing list