我修好了它。它没有安装,因为其中的安装选项/etc/fstab
是logdev=
带有外部日志的 xfs 选项。我使用它指定logdev=/dev/disk/by-uuid/<uuid of partition>
它需要实际的设备节点,即/dev/sda2
更正后的脚本如下。
#Mount Debian mirror
if
(( $(mount | grep -c mirror) == 0 )) && [ "$1" == "-m" ];
then
/bin/mount /home/tomas/mirror && echo "mirror has been mounted."
exit 0
elif
[ "$1" == "-m" ];
then
echo "Mirror is already mounted."
exit 0
fi
if
(( $(mount | grep -c mirror) == 1 )) && [ "$1" == "-u" ];
then
sudo /bin/umount /home/tomas/mirror && echo "Umounting mirror."
exit 0
elif
[ "$1" == "-u" ]
then
echo "Mirror is not mounted."
else
echo "Specify -m for mount or -u for umount."
fi
exit 0