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