Commits

Anonymous committed a6a61bb

Pushing fixed jailedtest.sh by uelsk8s

Comments (0)

Files changed (1)

modules/support/vectorlinux/tests/jailedtest.sh

 # Modified by M0E-lnx
 
 TEST=$1
-if [ -z $TEST ]; then
-    echo "No test provided"
-    exit 1
-fi
+CURDIR=$(pwd)
+echo $CURDIR
+cd ../../../../../
+CURDIR=$(pwd)
+echo $CURDIR
+mkdir -p /dev/shm/CHROOT-RW /dev/shm/CHROOT
+cp -ar vasm /dev/shm/CHROOT-RW/ || exit 1
+mount -t aufs -o br=/dev/shm/CHROOT-RW=rw:/=ro,xino=/dev/shm/aufs.xino none /dev/shm/CHROOT
+mount -t proc none /dev/shm/CHROOT/proc
+mount -o bind /dev/ /dev/shm/CHROOT/dev
+#ls -la /dev/shm/CHROOT
+chroot /dev/shm/CHROOT python /vasm/modules/support/vectorlinux/tests/$TEST
 
-function cleanup
-{
 umount /dev/shm/CHROOT/dev
 umount /dev/shm/CHROOT/proc
 umount /dev/shm/CHROOT
-rm -rf /dev/shm/CHROOT-RW/home/vasm
-rm -rf /dev/shm/CHROOT-RW/home/.hg*   
-}
-
-mkdir -p /dev/shm/CHROOT-RW /dev/shm/CHROOT
-cp -ar /home/vluser/devel/vasm /dev/shm/CHROOT-RW/home/vasm || exit 1
-mount -t aufs -o br=/dev/shm/CHROOT-RW=rw:/=ro,xino=/dev/shm/aufs.xino none /dev/shm/CHROOT
-mount -t proc none /dev/shm/CHROOT/proc
-mount -o bind /dev/ /dev/shm/CHROOT/dev
-chroot /dev/shm/CHROOT python /home/vasm/modules/support/vectorlinux/tests/$TEST || cleanup
-
-cleanup
-
-
+rm -rf /dev/shm/CHROOT-RW/vasm