aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2022-09-29 10:57:37 +0200
committerAndrew G. Morgan <morgan@kernel.org>2022-09-29 06:54:24 -0700
commit45bf9259a04fefc017024825c27153a650669577 (patch)
tree0f34afd16824e8c80c9bc6798a4c550bd27de7a6
parent4f96e6788d535da5f57a3452a54b8d92bd41cd8e (diff)
downloadlibcap-45bf9259a04fefc017024825c27153a650669577.tar.gz
Use POSIX `grep`
* GNU grep 3.8 considers `egrep` and `fgrep` obsolescent and throws warnings: ./mkcapshdoc.sh > capshdoc.c.cf fgrep: warning: fgrep is obsolescent; using /bin/grep -F fgrep: warning: fgrep is obsolescent; using /bin/grep -F fgrep: warning: fgrep is obsolescent; using /bin/grep -F fgrep: warning: fgrep is obsolescent; using /bin/grep -F [...] https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r--Make.Rules2
-rwxr-xr-xkdebug/test-kernel.sh2
-rwxr-xr-xprogs/mkcapshdoc.sh2
-rwxr-xr-xprogs/quicktest.sh2
4 files changed, 4 insertions, 4 deletions
diff --git a/Make.Rules b/Make.Rules
index d2768e1..26d433a 100644
--- a/Make.Rules
+++ b/Make.Rules
@@ -18,7 +18,7 @@ FAKEROOT=$(DESTDIR)
# administrative operations that could be needed to recover a system.
ifndef lib
-lib=$(shell ldd /usr/bin/ld|egrep "ld-linux|ld.so"|cut -d/ -f2)
+lib=$(shell ldd /usr/bin/ld|grep -E "ld-linux|ld.so"|cut -d/ -f2)
endif
ifndef sbin
diff --git a/kdebug/test-kernel.sh b/kdebug/test-kernel.sh
index 0962ce5..5d480c9 100755
--- a/kdebug/test-kernel.sh
+++ b/kdebug/test-kernel.sh
@@ -62,7 +62,7 @@ if [ -f "$HERE/interactive" ]; then
echo "file /root/interactive $HERE/interactive 0755 0 0" >> fs.conf
fi
-COMMANDS="awk cat chmod cp dmesg fgrep id less ln ls mkdir mount pwd rm rmdir sh sort umount uniq vi"
+COMMANDS="awk cat chmod cp dmesg grep id less ln ls mkdir mount pwd rm rmdir sh sort umount uniq vi"
for f in $COMMANDS; do
echo slink /bin/$f /sbin/busybox 0755 0 0 >> fs.conf
done
diff --git a/progs/mkcapshdoc.sh b/progs/mkcapshdoc.sh
index 8421685..d2ee4bd 100755
--- a/progs/mkcapshdoc.sh
+++ b/progs/mkcapshdoc.sh
@@ -15,7 +15,7 @@ EOF
let x=0
while [ -f "../doc/values/${x}.txt" ]; do
- name=$(fgrep ",${x}}" ../libcap/cap_names.list.h|sed -e 's/{"//' -e 's/",/ = /' -e 's/},//')
+ name=$(grep -F ",${x}}" ../libcap/cap_names.list.h|sed -e 's/{"//' -e 's/",/ = /' -e 's/},//')
echo "static const char *explanation${x}[] = { /* ${name} */"
sed -e 's/"/\\"/g' -e 's/^/ "/' -e 's/$/",/' "../doc/values/${x}.txt"
let x=1+${x}
diff --git a/progs/quicktest.sh b/progs/quicktest.sh
index 776b175..7366a6c 100755
--- a/progs/quicktest.sh
+++ b/progs/quicktest.sh
@@ -256,7 +256,7 @@ rm -f nsprivileged
cp ./tcapsh-static ./nsprivileged && /bin/chmod -s ./nsprivileged
./setcap -n 1 all=ep ./nsprivileged
if [ $? -eq 0 ]; then
- ./getcap -n ./nsprivileged | fgrep "[rootid=1]"
+ ./getcap -n ./nsprivileged | grep -F "[rootid=1]"
if [ $? -ne 0 ]; then
echo "FAILED setting ns rootid on file"
exit 1