fix
This commit is contained in:
parent
46fef2a5ee
commit
9f89cf35e6
1 changed files with 23 additions and 15 deletions
|
|
@ -1,27 +1,35 @@
|
||||||
BUILD=.build
|
BUILD=.build
|
||||||
DESTDIR=/
|
DESTDIR=/
|
||||||
|
|
||||||
for profile in "$@"
|
for profile in "$@"
|
||||||
do
|
do
|
||||||
cp $BUILD/apparmor.d/$profile $DESTDIR/etc/apparmor.d/$profile
|
echo "Installing profile $profile"
|
||||||
grep "rPx," "$BUILD/apparmor.d/$profile" | while read l1
|
cp $BUILD/apparmor.d/$profile $DESTDIR/etc/apparmor.d/
|
||||||
|
grep "rPx," "${BUILD}/apparmor.d/${profile}" | while read line
|
||||||
do
|
do
|
||||||
dep=$(echo "$l1" | awk '{print $1}')
|
dep=$(echo "$l1" | awk '{print $1}')
|
||||||
dep=$(echo $dep | awk -F"/" '{print $NF}')
|
dep=$(echo $dep | awk -F"/" '{print $NF}')
|
||||||
find . -type f -name $dep | while read l2
|
dep=$(eval "ls ${BUILD}/apparmor.d/${dep} 2>/dev/null")
|
||||||
do
|
for i in $dep
|
||||||
if [ ! -f "$DESTDIR/etc/apparmor.d/$dep" ]; then
|
do
|
||||||
install_seperate_with_depends $dep
|
i=$(echo $i | awk -F"/" '{print $NF}')
|
||||||
|
if [ ! -f "$DESTDIR/etc/apparmor.d/$i" ]; then
|
||||||
|
bash "$0" "$i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
grep "rPx -> " $BUILD/apparmor.d/$profile | while read l1
|
grep "rPx -> " "${BUILD}/apparmor.d/${profile}" | while read line
|
||||||
do
|
do
|
||||||
dep=$(echo $l1 | awk '{print $NF}' | awk '{if (NR!=1) {print substr($2, 1, length($2)-1)}}')
|
dep=${line%%#*}
|
||||||
find . -type f -name $dep | while read l2
|
dep=$(echo $dep | awk '{print $NF}')
|
||||||
do
|
dep=${dep::-1}
|
||||||
if [ ! -f "$DESTDIR/etc/apparmor.d/$dep" ]; then
|
dep=$(eval "ls ${BUILD}/apparmor.d/${dep} 2>/dev/null")
|
||||||
install_seperate_with_depends $dep
|
for i in $dep
|
||||||
fi
|
do
|
||||||
|
i=$(echo $i | awk -F"/" '{print $NF}')
|
||||||
|
if [ ! -f "$DESTDIR/etc/apparmor.d/$i" ]; then
|
||||||
|
bash "$0" "$i"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue