File: test-proocare.sh

package info (click to toggle)
proot 5.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,012 kB
  • sloc: ansic: 18,627; sh: 1,662; python: 108; asm: 41; makefile: 16; awk: 6
file content (27 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (4)
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
if [ ! -e /boot ] || [ -z `which mcookie` ] || [ -z `which ln` ] || [ -z `which mkdir` ] || [ -z `which rm` ]; then
    exit 125;
fi

if [ ! -e $CARE ]; then
    exit 125;
fi
unset PROOT

TMP_PROOT=/tmp/$(mcookie)
TMP_OUTPUT=/tmp/$(mcookie)/

ln -s ${CARE} ${TMP_PROOT}
mkdir ${TMP_OUTPUT}

${TMP_PROOT} -b /boot:/toob ${CARE} -o ${TMP_OUTPUT}/ ls /toob

test -e ${TMP_OUTPUT}/rootfs/toob

! test -e ${TMP_OUTPUT}/rootfs/boot
[ $? -eq 0 ]

${TMP_OUTPUT}/re-execute.sh

rm -fr ${TMP_PROOT} ${TMP_OUTPUT}