- include SMB drop-ins from /etc/samba/smb.conf.d into the generated smb.conf - keep smbd/nfs-server running while other services (/etc/exports.d, drop-ins) share, instead of disabling them when nasmon has no shares of its own - list those shares read-only on /shares - settings: RepoISO URL; poll its /api/integration/status, dashboard card, menu link, alerts for portal down, stale worker, failed jobs, unmounted publications Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,8 +26,9 @@ func anyGuest(c Config) bool {
|
||||
|
||||
// RenderSMB produces the complete smb.conf. owner is the Unix account every
|
||||
// SMB session acts as (force user), so files end up with the same owner the
|
||||
// containers use.
|
||||
func RenderSMB(c Config, owner string) string {
|
||||
// containers use. includes are drop-in files of other services appended as
|
||||
// "include =" lines.
|
||||
func RenderSMB(c Config, owner string, includes ...string) string {
|
||||
var b strings.Builder
|
||||
fmt.Fprintf(&b, "%s\n\n[global]\n", Header)
|
||||
// Bad User turns unknown accounts (e.g. the Windows login) into guests.
|
||||
@@ -98,6 +99,12 @@ func RenderSMB(c Config, owner string) string {
|
||||
fmt.Fprintf(&b, " %s\n", l)
|
||||
}
|
||||
}
|
||||
if len(includes) > 0 {
|
||||
b.WriteString("\n# Shares of other services (read-only in nasmon)\n")
|
||||
for _, f := range includes {
|
||||
fmt.Fprintf(&b, "include = %s\n", f)
|
||||
}
|
||||
}
|
||||
return b.String()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user