mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
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>
This commit is contained in:
parent
7e1fc09c4f
commit
86ccaf4c18
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
. /lib/functions.sh
|
. /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##*/}"
|
||||||
file="${file%.control}"
|
file="${file%.control}"
|
||||||
add_group_and_user "${file}"
|
add_group_and_user "${file}"
|
||||||
|
Loading…
Reference in New Issue
Block a user