Skip to content

Commit

Permalink
make -jjjj and -jjjjj path configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffbeck committed Aug 11, 2022
1 parent da4ded2 commit 4af1ad7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions sophomorix-samba/config-devel/sophomorix.ini
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
GPO_PRINTERS_TEMPLATE_PRE = /usr/share/sophomorix/devel/gpo/Printers.xml.template.pre
GPO_PRINTERS_TEMPLATE_POST = /usr/share/sophomorix/devel/gpo/Printers.xml.template.post
GPO_PRINTERS_TARGET_DIR = /var/lib/sophomorix/gpo/school
JSON_OUTPUT_PATH = /tmp

[USERLOG]
USER_LOGDIR = /var/log/sophomorix/userlog
Expand Down
11 changes: 7 additions & 4 deletions sophomorix-samba/modules/SophomorixBase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -406,23 +406,23 @@ sub json_dump {
&print_title("DUMP: $jsoncomment");
print {$ref_sophomorix_config->{'INI'}{'VARS'}{'JSON_PRINTOUT'}} Dumper( $hash_ref );
} elsif ($json==4){
# pretty output
# pretty output in file
$hash_ref->{'JSONINFO'}=$jsoninfo;
$hash_ref->{'JSONCOMMENT'}=$jsoncomment;
my $json_obj = JSON->new->allow_nonref;
my $utf8_pretty_printed = $json_obj->pretty->encode( $hash_ref );
my $output="/root/output.json";
my $output=$ref_sophomorix_config->{'INI'}{'PATHS'}{'JSON_OUTPUT_PATH'}."/output.json";
print "output to file $output\n";
open(my $fh, ">", $output);
print $fh $utf8_pretty_printed;
close($fh);
} elsif ($json==5){
# pretty output
# compact output in file
$hash_ref->{'JSONINFO'}=$jsoninfo;
$hash_ref->{'JSONCOMMENT'}=$jsoncomment;
my $json_obj = JSON->new->allow_nonref;
my $utf8_json_line = $json_obj->encode( $hash_ref );
my $output="/root/output.json";
my $output=$ref_sophomorix_config->{'INI'}{'PATHS'}{'JSON_OUTPUT_PATH'}."/output.json";
print "output to file $output\n";
open(my $fh, ">", $output);
print $fh $utf8_json_line;
Expand Down Expand Up @@ -6156,6 +6156,9 @@ sub create_plain_password {
}
#print "Password to test: $password\n";
}
if (not $password=~m/[a-z]/){
print "Password contains no small letters\n";
}
}
#print "Password OK: $password\n";
return $password;
Expand Down

0 comments on commit 4af1ad7

Please sign in to comment.