aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2017-01-24 18:55:13 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2017-01-24 19:08:41 +0100
commit86ccaf4c18dabec9761e71a31d1456611cf1cdf9 (patch)
tree2b30edfcbb5e2fcc68d175fb5d4ebcd5a3aa1c8b /package/base-files/files/etc
parent7e1fc09c4f2cc1656f315abaf6d3ba0eb11aa3fa (diff)
downloadupstream-86ccaf4c18dabec9761e71a31d1456611cf1cdf9.tar.gz
upstream-86ccaf4c18dabec9761e71a31d1456611cf1cdf9.tar.bz2
upstream-86ccaf4c18dabec9761e71a31d1456611cf1cdf9.zip
base-files: fix user creation on sysupgrade with few opkg control files
If only a single opkg control file exists (which can happen with CONFIG_CLEAN_IPKG), grep would not print the file name by default. Instead of forcing it using -H, we just switch to -l (print only file names) and get rid of the cut. Add -s to suppress an error message when no control files exist. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'package/base-files/files/etc')
-rw-r--r--package/base-files/files/etc/uci-defaults/13_fix_group_user2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/etc/uci-defaults/13_fix_group_user b/package/base-files/files/etc/uci-defaults/13_fix_group_user
index deade5bbd1..e6dae2419f 100644
--- a/package/base-files/files/etc/uci-defaults/13_fix_group_user
+++ b/package/base-files/files/etc/uci-defaults/13_fix_group_user
@@ -2,7 +2,7 @@
. /lib/functions.sh
-for file in `grep Require-User /usr/lib/opkg/info/*.control | cut -d: -f1`; do
+for file in `grep -sl Require-User /usr/lib/opkg/info/*.control`; do
file="${file##*/}"
file="${file%.control}"
add_group_and_user "${file}"