summaryrefslogtreecommitdiffstats
path: root/server/includes
diff options
context:
space:
mode:
authorChristian Rößler2014-02-20 15:41:26 +0100
committerChristian Rößler2014-02-20 15:41:26 +0100
commit0981c3070b1903b799316f5c61567f7c527e3072 (patch)
tree10a17268065767a87605dabce4376997a9c534f9 /server/includes
parent[nvidia_libs] Module building libraries for nvidia GPU driver package. (diff)
parentSupport loading selected drm gfx drivers only, based on pci ids (diff)
downloadtm-scripts-0981c3070b1903b799316f5c61567f7c527e3072.tar.gz
tm-scripts-0981c3070b1903b799316f5c61567f7c527e3072.tar.xz
tm-scripts-0981c3070b1903b799316f5c61567f7c527e3072.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'server/includes')
-rw-r--r--server/includes/packing.inc11
1 files changed, 10 insertions, 1 deletions
diff --git a/server/includes/packing.inc b/server/includes/packing.inc
index b94d06e8..d24c8e51 100644
--- a/server/includes/packing.inc
+++ b/server/includes/packing.inc
@@ -32,8 +32,17 @@ generate_squashfs() {
if [ -n "$3" ]; then
find "$3" -type f -o -type l | cut -c "$(( ${#3} + 2 ))-" > "$IGNORE"
fi
+ # Detect mksquashfs xz support
+ local PARAMS
+ if mksquashfs 2>&1 | grep -A 8 '^-comp' | grep -q '\sxz'; then
+ pinfo "Using xz compression"
+ PARAMS="-comp xz"
+ else
+ pinfo "Using default compression"
+ PARAMS=""
+ fi
rm -f -- "$2"
- mksquashfs "$1" "$2" -ef "$IGNORE" -comp xz -b 1M -no-recovery >&6 \
+ mksquashfs "$1" "$2" -ef "$IGNORE" $PARAMS -b 1M -no-recovery >&6 \
|| perror "mksquashfs failed ($?)."
pinfo "Created squashfs of $1 at $2"
pinfo "Size: $(du -bsh "$2" | awk 'END {print $1}')"