From f3ae575aca3a150f0cf0b652564cf758dc19dcc5 Mon Sep 17 00:00:00 2001 From: Rene Diepstraten Date: Dec 28 2013 22:05:04 +0000 Subject: el7 has different name for symlink mimetype --- diff --git a/tests/p_file/03_file_mime_symlink.sh b/tests/p_file/03_file_mime_symlink.sh index 442334d..d26721a 100755 --- a/tests/p_file/03_file_mime_symlink.sh +++ b/tests/p_file/03_file_mime_symlink.sh @@ -8,13 +8,19 @@ TEST_FILE_PATH="/tmp/p_file_link_test" ln -s /etc/hosts $TEST_FILE_PATH -if (t_GetPkgRel basesystem | grep -q el5) - then - file -i $TEST_FILE_PATH | grep -q 'x-not-regular-file' - ret_val=$? -else - file -i $TEST_FILE_PATH | grep -q 'application/x-symlink' - ret_val=$? -fi +case $centos_ver in + 5) + mimetype='x-not-regular-file' + ;; + 6) + mimetype='application/x-symlink' + ;; + *) + mimetype='inode/symlink' + ;; +esac + +file -i $TEST_FILE_PATH | grep -q $mimetype +ret_val=$? t_CheckExitStatus $ret_val