-
Notifications
You must be signed in to change notification settings - Fork 7
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
Added command line support for Active Slave sync #6
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,6 +140,14 @@ def main | |
), | ||
"type" => "string" | ||
}, | ||
"sync_slave" => { | ||
# command line help text for the 'sync_slave' option | ||
"help" => _( | ||
"Sync to NIS Slave servers" | ||
), | ||
"type" => "enum", | ||
"typespec" => ["yes", "no"] | ||
}, | ||
"securenets" => { | ||
# command line help text for the 'hosts' option | ||
"help" => _( | ||
|
@@ -150,7 +158,7 @@ def main | |
}, | ||
"mappings" => { | ||
"summary" => [], | ||
"master" => ["domain", "yppasswd", "ypdir", "maps", "securenets"], | ||
"master" => ["domain", "yppasswd", "ypdir", "maps", "securenets", "sync_slave"], | ||
"slave" => ["domain", "master_ip", "securenets"] | ||
} | ||
} | ||
|
@@ -365,6 +373,10 @@ def NisServerMasterHandler(options) | |
if Ops.get_string(options, "yppasswd", "") != "" | ||
NisServer.start_yppasswdd = Ops.get_string(options, "yppasswd", "") == "yes" | ||
end | ||
|
||
if Ops.get_string(options, "sync_slave", "") != "" | ||
NisServer.nopush = Ops.get_string(options, "sync_slave", "") == "yes" | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to use get_string here. Just options["sync_slave"] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, just Option["sysc_slave"] would be a slim version, But I guess the get_string just go with flow of the code very well. let me know, both seems to be nice.
|
||
NisServer.maps = deep_copy(maps) | ||
NisServer.securenets = deep_copy(securenets) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,7 +168,7 @@ def MasterDialog | |
Id(:have_slave), | ||
# To translators: checkbox label | ||
_("Active Slave NIS server &exists"), | ||
!nopush | ||
nopush | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure? The comment about @nopush in NisServer.rb says "Don't push the changes to slave servers" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, By default it should not send any data to any server, unless specified by user, in this case it will not send, unless the option passed by the users.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But this is not about the default value. The check box is checked for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for the delay.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @jsuchome Any update on this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but also the value at line 171. |
||
) | ||
), | ||
VSpacing(0.5), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using the full word here (Synchronize ... or maybe Push)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Sound nice, I guess this should be ok.
"Synchronize Master Nis server to Slave Nis servers"