base-files: fix group/user settings after sysupgrade
authorJohn Crispin <john@openwrt.org>
Sat, 30 Apr 2016 16:53:27 +0000 (16:53 +0000)
committerJohn Crispin <john@openwrt.org>
Sat, 30 Apr 2016 16:53:27 +0000 (16:53 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 49276

package/base-files/files/etc/uci-defaults/13_fix_group_user [new file with mode: 0644]

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
new file mode 100644 (file)
index 0000000..deade5b
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+. /lib/functions.sh
+
+for file in `grep Require-User /usr/lib/opkg/info/*.control | cut -d: -f1`; do
+       file="${file##*/}"
+       file="${file%.control}"
+       add_group_and_user "${file}"
+done
+
+exit 0