On su, 17 huhti 2022, Matthew Miller wrote:
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
Probably something of that, right. It probably would be good to add more explanation into the final 'else' block what it does mean by 'activate cockpit module config' too. I guess we can add a wiki page and specify URL to it.