Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 1 | Upstream Status: Inappropriate [No upstream maintenance] |
| 2 | |
| 3 | Signed-off-by: Anne Mulhern <mulhern@yoctoproject.org> |
| 4 | |
| 5 | --- |
| 6 | |
| 7 | Index: Bastille/Bastille/API.pm |
| 8 | =================================================================== |
| 9 | --- Bastille.orig/Bastille/API.pm 2013-08-21 11:41:09.235950000 -0400 |
| 10 | +++ Bastille/Bastille/API.pm 2013-08-21 11:41:16.183950000 -0400 |
| 11 | @@ -271,9 +271,15 @@ |
| 12 | # setOptions takes six arguments, $GLOBAL_DEBUG, $GLOBAL_LOGONLY, |
| 13 | # $GLOBAL_VERBOSE, $GLOBAL_AUDITONLY, $GLOBAL_AUDIT_NO_BROWSER, and GLOBAL_OS; |
| 14 | ########################################################################### |
| 15 | -sub setOptions($$$$$$) { |
| 16 | - ($GLOBAL_DEBUG,$GLOBAL_LOGONLY,$GLOBAL_VERBOSE,$GLOBAL_AUDITONLY, |
| 17 | - $GLOBAL_AUDIT_NO_BROWSER,$GLOBAL_OS) = @_; |
| 18 | +sub setOptions { |
| 19 | + my %opts = @_; |
| 20 | + |
| 21 | + $GLOBAL_DEBUG = $opts{debug}; |
| 22 | + $GLOBAL_LOGONLY = $opts{logonly}; |
| 23 | + $GLOBAL_VERBOSE = $opts{verbose}; |
| 24 | + $GLOBAL_AUDITONLY = $opts{auditonly}; |
| 25 | + $GLOBAL_AUDIT_NO_BROWSER = $opts{audit_no_browser}; |
| 26 | + $GLOBAL_OS = $opts{os}; |
| 27 | if ($GLOBAL_AUDIT_NO_BROWSER) { |
| 28 | $GLOBAL_AUDITONLY = 1; |
| 29 | } |
| 30 | Index: Bastille/BastilleBackEnd |
| 31 | =================================================================== |
| 32 | --- Bastille.orig/BastilleBackEnd 2013-08-21 11:41:09.235950000 -0400 |
| 33 | +++ Bastille/BastilleBackEnd 2013-08-21 12:40:54.055950001 -0400 |
| 34 | @@ -50,15 +50,13 @@ |
| 35 | my $nodisclaim = 0; |
| 36 | my $verbose = 0; |
| 37 | my $force = 0; |
| 38 | -my $log_only = 0; |
| 39 | my $debug = 0; |
| 40 | my $alternate_config=undef; |
| 41 | |
| 42 | if( Getopt::Long::GetOptions( "n" => \$nodisclaim, |
| 43 | "v" => \$verbose, |
| 44 | "force" => \$force, |
| 45 | -# "log" => \$log_only, # broken |
| 46 | - "f:s" => \$alternate_config, |
| 47 | + "f=s" => \$alternate_config, |
| 48 | "debug" => \$debug) ) { |
| 49 | $error = 0; # no parse error |
| 50 | |
| 51 | @@ -66,7 +64,9 @@ |
| 52 | $error = 1; # parse error |
| 53 | } |
| 54 | |
| 55 | -&setOptions($debug,$log_only,$verbose); |
| 56 | +&setOptions( |
| 57 | + debug => $debug, |
| 58 | + verbose => $verbose); |
| 59 | &ConfigureForDistro; |
| 60 | |
| 61 | if ( $error ) { # GetOptions couldn't parse all of the args |
| 62 | Index: Bastille/InteractiveBastille |
| 63 | =================================================================== |
| 64 | --- Bastille.orig/InteractiveBastille 2013-08-21 11:41:09.235950000 -0400 |
| 65 | +++ Bastille/InteractiveBastille 2013-08-21 12:40:30.531950001 -0400 |
| 66 | @@ -234,8 +234,8 @@ |
| 67 | "a" => \$audit, |
| 68 | "force" => \$force, |
| 69 | "log" => \$log_only, |
| 70 | - "os:s" => \$os_version, |
| 71 | - "f:s" => \$alternate_config, |
| 72 | + "os=s" => \$os_version, |
| 73 | + "f=s" => \$alternate_config, |
| 74 | "debug" => \$debug) ) { |
| 75 | $error = 0; # no parse error |
| 76 | } else { |
| 77 | @@ -293,7 +293,13 @@ |
| 78 | $UseRequiresRules = 'N'; |
| 79 | } |
| 80 | |
| 81 | -&setOptions($debug,$log_only,$verbose,$audit,$auditnobrowser,$os_version); |
| 82 | +&setOptions( |
| 83 | + debug => $debug, |
| 84 | + logonly => $log_only, |
| 85 | + verbose => $verbose, |
| 86 | + auditonly => $audit, |
| 87 | + audit_no_browser => $auditnobrowser, |
| 88 | + os => $os_version); |
| 89 | &ConfigureForDistro; |
| 90 | |
| 91 | # ensuring mutually exclusive options are exclusive |