1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
# platform = multi_platform_all
# reboot = false
{{{ bash_instantiate_variables("var_removable_partition") }}}
device_regex="^\s*$var_removable_partition\s\+"
mount_option="{{{ MOUNTOPTION }}}"
if grep -q $device_regex /etc/fstab ; then
previous_opts=$(grep $device_regex /etc/fstab | awk '{print $4}')
sed -i "s|\($device_regex.*$previous_opts\)|\1,$mount_option|" /etc/fstab
else
echo "Not remediating, because there is no record of $var_removable_partition in /etc/fstab" >&2
fi
|