if [ "$PKG_UPGRADE" != "1" ]; then
"$i" disable
fi
- "$i" stop
+ "$i" stop || /bin/true
fi
done
}
ret=$?
fi
+ if [ -d "$root/rootfs-overlay" ]; then
+ cp -R $root/rootfs-overlay/. $root/
+ rm -fR $root/rootfs-overlay/
+ fi
+
if [ -z "$root" ] && grep -q -s "^/etc/uci-defaults/" "/usr/lib/opkg/info/${pkgname}.list"; then
. /lib/functions/system.sh
[ -d /tmp/.uci ] || mkdir -p /tmp/.uci
gid=$(grep -s "^${1}:" ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
[ -n "$gid" ] && return $gid
gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
- gid=100
- while [ -n "$(echo $gids | grep $gid)" ] ; do
+ gid=65536
+ while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do
gid=$((gid + 1))
done
group_add $1 $gid
local rc
[ -z "$uid" ] && {
uids=$(cat ${IPKG_INSTROOT}/etc/passwd | cut -d: -f3)
- uid=100
- while [ -n "$(echo $uids | grep $uid)" ] ; do
+ uid=65536
+ while [ -n "$(echo "$uids" | grep "^$uid$")" ] ; do
uid=$((uid + 1))
done
}
grep -qs "^${1}:" ${IPKG_INSTROOT}/etc/passwd
}
+board_name() {
+ [ -e /tmp/sysinfo/board_name ] && cat /tmp/sysinfo/board_name || echo "generic"
+}
+
[ -z "$IPKG_INSTROOT" -a -f /lib/config/uci.sh ] && . /lib/config/uci.sh