On Fri, Apr 15, 2022 at 08:21:09AM +0300, Alexander Bokovoy wrote:
I am fine if Cockpit app would limit itself to the cases it
considers
supportable. However, at the moment I don't see a good way to detect
what is supportable purely from the configuration file using Samba
tools.
What about (warning: untested bash I'm writing ad-hoc!) something like:
if ! rpmverify -c samba-common; then
if [[ -h /etc/samba/smb.conf ]] && [[ "$(readlink
/etc/samba/smb.conf)" ]] ==
"/usr/share/cockpit/file-sharing/samba-manager/config/smb.conf"]; then
echo "Already configured for cockpit module."
else
echo "System is configured in some other way. We can't handle this. Read
more..."
fi
else
echo "Default config detected. Press this button to activate cockpit module
config."
fi
--
Matthew Miller
<mattdm(a)fedoraproject.org>
Fedora Project Leader