Skip to content

Fix webmin netatalk paths#1305

Merged
rdmark merged 4 commits intoPiSCSI:developfrom
benjamink:fix-webmin-netatalk-paths
Nov 5, 2023
Merged

Fix webmin netatalk paths#1305
rdmark merged 4 commits intoPiSCSI:developfrom
benjamink:fix-webmin-netatalk-paths

Conversation

@benjamink
Copy link
Copy Markdown
Collaborator

Fixes #1304

@rdmark
Copy link
Copy Markdown
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
Copy Markdown
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
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
Copy Markdown
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
Copy Markdown
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
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
Copy Markdown
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
Copy Markdown
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
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