Add smart

This commit is contained in:
Mario Fetka
2026-04-21 04:52:41 +02:00
parent 24f48e1f96
commit bb9392b9b0
6 changed files with 47 additions and 32 deletions

View File

@@ -138,17 +138,17 @@ sub handle_request()
if( $p{mars_config} ne $mars_config )
{
# Just append the line. Messy but easy. ;)
open( FILE, '>>' . $base . 'smart.conf' );
open( FILE, '>>' . $smart_conf_path ) or die "Could not open $smart_conf_path: $!";
print( FILE "\n" . '$mars_config = \'' . $p{mars_config} . '\';' . "\n" );
close( FILE );
}
open( FILE, '>' . $base . '.nwclient' );
open( FILE, '>' . $smart_nwclient_path ) or die "Could not open $smart_nwclient_path: $!";
print( FILE $p{bind_server} . '/' . $p{bind_user} . ' ' . $p{bind_pass } . "\n" );
close( FILE );
chown( scalar( getpwnam( $nonroot_user ) ), 0, $base . '.nwclient' );
chmod( 0600, $base . '.nwclient' );
chown( scalar( getpwnam( $nonroot_user ) ), 0, $smart_nwclient_path );
chmod( 0600, $smart_nwclient_path );
}
elsif( $c[1] eq 'users' )
{