Use what(1) instead of strings(1). It's simpler and always available.
PR: 213665 Submitted by: Pawel Worach <pawel.worach@gmail.com> MFC after: 1 week
This commit is contained in:
parent
a40ce729ed
commit
31f964de0e
@ -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"
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user