mirror of
https://github.com/samba-team/samba.git
synced 2025-12-20 16:23:51 +03:00
samba-tool: Test gpo manage script startup add command
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
committed by
Jeremy Allison
parent
d22196117c
commit
f6a0bd8b91
@@ -3113,10 +3113,41 @@ samba-tool gpo manage scripts startup list {31B2F340-016D-11D2-945F-00C04FB984F9
|
||||
self.outf.write('@reboot %s %s %s' % (run_as, script_path,
|
||||
parameters.text))
|
||||
|
||||
class cmd_add_startup(Command):
|
||||
"""Adds VGP Startup Script Group Policy to the sysvol
|
||||
|
||||
This command adds a startup script policy to the sysvol.
|
||||
|
||||
Example:
|
||||
samba-tool gpo manage scripts startup add {31B2F340-016D-11D2-945F-00C04FB984F9} test_script.sh '-n'
|
||||
"""
|
||||
|
||||
synopsis = "%prog <gpo> <script> [args] [run_as] [options]"
|
||||
|
||||
takes_optiongroups = {
|
||||
"sambaopts": options.SambaOptions,
|
||||
"versionopts": options.VersionOptions,
|
||||
"credopts": options.CredentialsOptions,
|
||||
}
|
||||
|
||||
takes_options = [
|
||||
Option("-H", "--URL", help="LDB URL for database or target server", type=str,
|
||||
metavar="URL", dest="H"),
|
||||
Option("--run-once", dest="run_once", default=False, action='store_true',
|
||||
help="Whether to run the script only once"),
|
||||
]
|
||||
|
||||
takes_args = ["gpo", "script", "args?", "run_as?"]
|
||||
|
||||
def run(self, gpo, script, args=None, run_as=None, run_once=None,
|
||||
H=None, sambaopts=None, credopts=None, versionopts=None):
|
||||
pass
|
||||
|
||||
class cmd_startup(SuperCommand):
|
||||
"""Manage Startup Scripts Group Policy Objects"""
|
||||
subcommands = {}
|
||||
subcommands["list"] = cmd_list_startup()
|
||||
subcommands["add"] = cmd_add_startup()
|
||||
|
||||
class cmd_scripts(SuperCommand):
|
||||
"""Manage Scripts Group Policy Objects"""
|
||||
|
||||
Reference in New Issue
Block a user