mirror of
https://github.com/termux/proot.git
synced 2024-11-11 13:49:26 +00:00
18 lines
394 B
Bash
18 lines
394 B
Bash
if [ ! -x ${ROOTFS}/bin/true ] || [ -z `which mcookie` ] || [ -z `which mkdir` ] || [ -z `which echo` ] || [ -z `which chmod` ]; then
|
|
exit 125;
|
|
fi
|
|
|
|
TMP=/tmp/`mcookie`
|
|
rm -f ${ROOTFS}/${TMP}
|
|
|
|
mkdir -p ${ROOTFS}/tmp
|
|
echo '#!/bin/true' > ${ROOTFS}/${TMP}
|
|
|
|
chmod -x ${ROOTFS}/${TMP}
|
|
! ${PROOT} -r ${ROOTFS} ${TMP}
|
|
|
|
chmod +x ${ROOTFS}/${TMP}
|
|
${PROOT} -r ${ROOTFS} ${TMP}
|
|
|
|
rm -f ${ROOTFS}/${TMP}
|