blob: 3170cc9ce44215dce2a85cd2ac1cc2441bebd23b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
pkg_postinst_ontarget_${PN}_append () {
df / --exclude-type=nfs > /dev/null
IS_EMMC_BOOT=$?
if [ $IS_EMMC_BOOT -eq 0 ]; then
CAPVARS="${CAPABILITY}"
IFS=" "
for cap in $CAPVARS; do
capability=`echo $cap | cut -f 1 -d ":"`
file=`echo $cap | cut -f 2 -d ":"`
setcap $capability $D$file
done
else
CAPVARS="${CAPABILITY}"
IFS=" "
for cap in $CAPVARS; do
capability=`echo $cap | cut -f 1 -d ":"`
file=`echo $cap | cut -f 2 -d ":"`
TCAP_NAME="/tmp/${file##*/}"
if [ ! -L ${file} ]; then
cp -a ${file} ${TCAP_NAME}
mv ${file} ${file}.org
ln -fs ${TCAP_NAME} ${file}
else
cp -a ${file}.org ${TCAP_NAME}
fi
setcap ${capability} ${TCAP_NAME}
done
fi
}
#RDEPENDS_${PN} += "libcap-bin"
PACKAGE_WRITE_DEPS = "libcap-native"
|