-if [ ! -d $FOLDER ]; then echo "$FOLDER doesnt exist"; exit 1; fi
-if [ ! -f $PXML ]; then echo "$PXML doesnt exist"; exit 1; fi
-
-
-mkisofs -o $PNDNAME.iso -R $FOLDER
-#pxmlstart=$(stat -c%s "$PNDNAME.iso")
-
+#make iso from folder
+if [ ! $SQUASH ]; then
+ mkisofs -o $PNDNAME.iso -R $FOLDER
+else
+ if [ $(mksquashfs -version | awk '{if ($3 >= 4) print 1}') = 1 ]; then
+ echo "your squashfs version is older then version 4, pleas upgrade to 4.0 or later"
+ exit 1
+ fi
+ mksquashfs -no-recovery -nopad $FOLDER $PNDNAME.iso
+fi
+#append pxml to iso