From 70edca98d2653cb1874545f67014e5dc84708790 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 26 Sep 2015 11:40:15 +0100 Subject: make kernel version checking a bit more robust --- libvasile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libvasile') diff --git a/libvasile b/libvasile index dee2937..1240be2 100755 --- a/libvasile +++ b/libvasile @@ -63,9 +63,9 @@ chrootchecksumx64 () { chrootstartx64 () { mount -t squashfs "$chrootx64" "$rodir" - if [[ "$(uname -r | cut -d - -f1)" = "3.14.0" ]] ; then + if [[ "$(uname -r | cut -d . -f1,2)" = "3.14" ]] ; then mount -t overlayfs -o lowerdir="$rodir",upperdir="$rwdir" overlayfs "$overlaydir" - elif [[ "(uname -r | cut -d - -f1)" = "4.1.0" ]] ; then + elif [[ "(uname -r | cut -d . -f1,2)" = "4.1" ]] ; then mount -t overlay -o lowerdir="$rodir",upperdir="$rwdir",workdir="$workdir" overlay "$overlaydir" fi while : true ; do @@ -169,9 +169,9 @@ chrootchecksumx86 () { chrootstartx86 () { mount -t squashfs "$chrootx86" "$rodir" - if [[ "$(uname -r | cut -d - -f1)" = "3.14.0" ]] ; then + if [[ "$(uname -r | cut -d . -f1,2)" = "3.14" ]] ; then mount -t overlayfs -o lowerdir="$rodir",upperdir="$rwdir" overlayfs "$overlaydir" - elif [[ "(uname -r | cut -d - -f1)" = "4.1.0" ]] ; then + elif [[ "(uname -r | cut -d . -f1,2)" = "4.1" ]] ; then mount -t overlay -o lowerdir="$rodir",upperdir="$rwdir",workdir="$workdir" overlay "$overlaydir" fi while : true ; do -- cgit v1.2.3