This commit is contained in:
tuxwarrior
2024-05-06 17:30:02 -05:00
parent ac91fd1502
commit 6c12b81b39

View File

@@ -47,6 +47,7 @@ if mount | grep ${trg_dir} > /dev/null; then
echo "${trg_dir} is already mounted."
echo "if you want to unmount this directory, please run:"
echo "umount ${trg_dir}"
echo
else
echo "mounting source '${src_dir}' to target '${trg_dir}'."
@@ -62,14 +63,13 @@ the_file=/etc/fstab
if [ -f "${the_file}" ]; then
if ! more ${the_file} | grep 'syncDir'
then
echo ""
echo "" | sudo tee -a ${the_file}
echo "# auto mount syncDir" | sudo tee -a ${the_file}
echo "${src_dir} ${trg_dir} auto defaults,nofail,nobootwait,bind 0 2" | sudo tee -a ${the_file}
echo "> auto mount of syncDir added to '${the_file}'"
echo "> new: auto mount of syncDir added to '${the_file}'"
else
echo "> auto mount of syncDir already existed in '${the_file}'"
echo "> no change: auto mount of syncDir found in '${the_file}'"
fi
fi