Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix webmin netatalk paths #1305

Merged
merged 4 commits into from
Nov 5, 2023
Merged

Conversation

benjamink
Copy link
Collaborator

Fixes #1304

@rdmark
Copy link
Member

rdmark commented Nov 4, 2023

@benjamink Was it only the binaries that were in a different location from what the netatalk2 module expected?

For your reference, this is what we have as the default config right now: https://github.com/Netatalk/netatalk-webmin/blob/branch-netatalk2/config

When I set this script up, my goal was to align with the default locations that you get when using the netatalk install script in easyinstall.sh. Before making any changes, I want to double check that the afpd binaries get installed in /usr/local/sbin and not /usr/sbin with a fresh install.

@erichelgeson erichelgeson removed their request for review November 5, 2023 00:03
@rdmark
Copy link
Member

rdmark commented Nov 5, 2023

Confirmed the default location:

dmark@macuntu:~/piscsi$ stat /usr/local/sbin/afpd
  File: /usr/local/sbin/afpd
  Size: 2399160   	Blocks: 4688       IO Block: 4096   regular file
Device: fc02h/64514d	Inode: 1610085     Links: 1

easyinstall.sh Outdated
@@ -974,6 +974,8 @@ function installWebmin() {
rm netatalk2-wbm.tgz || true
wget -O netatalk2-wbm.tgz "https://github.com/Netatalk/netatalk-webmin/releases/download/netatalk2-$WEBMIN_MODULE_VERSION/netatalk2-wbm-$WEBMIN_MODULE_VERSION.tgz" </dev/null
sudo /usr/share/webmin/install-module.pl netatalk2-wbm.tgz
sudo sed -i 's/\/sbin/\/local\/sbin/' /etc/webmin/netatalk2/config
sudo systemctl restart webmin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the restart is required here. The updated config should be read immediately by the webmin module.

Copy link
Collaborator Author

@benjamink benjamink Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok. Removed.

easyinstall.sh Outdated
@@ -974,6 +974,8 @@ function installWebmin() {
rm netatalk2-wbm.tgz || true
wget -O netatalk2-wbm.tgz "https://github.com/Netatalk/netatalk-webmin/releases/download/netatalk2-$WEBMIN_MODULE_VERSION/netatalk2-wbm-$WEBMIN_MODULE_VERSION.tgz" </dev/null
sudo /usr/share/webmin/install-module.pl netatalk2-wbm.tgz
sudo sed -i 's/\/sbin/\/local\/sbin/' /etc/webmin/netatalk2/config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is stylistic suggestion for readability, but when operating on strings with slashes in them, I recommend using a different delimiter for the s command. I think I used @ elsewhere in this script.

https://backreference.org/2010/02/20/using-different-delimiters-in-sed/index.html

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Fixed.

@rdmark rdmark merged commit bd5341d into PiSCSI:develop Nov 5, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants