Small grammar tweaks to the script's output messages. Signed-off-by: Lucas Meneghel Rodrigues <lmr@scylladb.com> Message-Id: <1466205496-3885-3-git-send-email-lmr@scylladb.com>
36 lines
1.0 KiB
Bash
Executable File
36 lines
1.0 KiB
Bash
Executable File
#!/bin/bash -e
|
|
#
|
|
# Copyright (C) 2016 ScyllaDB
|
|
|
|
. /etc/os-release
|
|
|
|
if [ ! -f /sbin/mkfs.xfs ]; then
|
|
if [ "$ID" = "ubuntu" ]; then
|
|
apt-get install -y xfsprogs
|
|
else
|
|
yum install -y xfsprogs
|
|
fi
|
|
fi
|
|
|
|
mkdir -p /var/tmp/mnt
|
|
dd if=/dev/zero of=/var/tmp/kernel-check.img bs=1M count=128 > /dev/null 2>&1
|
|
mkfs.xfs /var/tmp/kernel-check.img > /dev/null
|
|
mount /var/tmp/kernel-check.img /var/tmp/mnt -o loop
|
|
iotune --fs-check --evaluation-directory /var/tmp/mnt > /dev/null 2>&1 &&:
|
|
RET=$?
|
|
umount /var/tmp/mnt
|
|
rm -rf /var/tmp/mnt
|
|
rm /var/tmp/kernel-check.img
|
|
if [ $RET -eq 0 ]; then
|
|
echo "This is a supported kernel version."
|
|
else
|
|
echo "This is an unsupported kernel version."
|
|
if [ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "14.04" ]; then
|
|
echo "Please upgrade to a newer kernel version by executing 'apt-get install linux-image-generic-lts-vivid && reboot'."
|
|
else
|
|
echo "Please upgrade to a newer kernel version."
|
|
fi
|
|
echo " see http://docs.scylladb.com/kb/kb-fs-not-qualified-aio/ for details"
|
|
fi
|
|
exit $RET
|