etOptions(@options); if ( ! $result ) { die "Terminating due to parameter error"; }; if ( $main::opt_help ) { warn "$main::program_name $main::program_version $main::program_date\n"; warn "$0 \n"; warn " -help\n" if $main::opt_help; warn " -debug\n" if $main::opt_debug; warn " -test\n" if $main::opt_debug; warn " -static\n" if $main::opt_static; warn " -o $main::opt_output_file\n" if $main::opt_output_file; warn " -i $main::opt_input_file\n" if $main::opt_input_file; exit 0; }; if ( $main::opt_test ) { &sm2cron_time(""); &sm2cron_time("6s"); &sm2cron_time("5m"); &sm2cron_time("4h"); &sm2cron_time("3d"); &sm2cron_time("2w"); &sm2cron_time("2w3d4h5m6s"); &sm2cron_time("89s"); &sm2cron_time("90m"); &sm2cron_time("150m"); &sm2cron_time("125"); &sm2cron_time("31d"); &sm2cron_time("35d"); &sm2cron_time("5w"); &sm2cron_time("9w"); exit 0; }; $output_file = $main::opt_output_file if ($main::opt_output_file); my $input_file = $main::opt_input_file || $Conffile; # $main::debug is used in Parse_mc ! $main::debug = $main::opt_debug || $main::debug; # Read /etc/mail/sendmail.conf (if extant) &Parse_conf::read_config($Conffile); # [Re]write /etc/mail/sendmail.config &Parse_conf::write_config($Conffile); my ($ok, $value) = &Parse_conf::get_value('HANDS_OFF'); if ($value ne '0') { unlink "/etc/cron.d/sendmail"; exit; }; # Reflect settings in /etc/cron.d/sendmail &write_crontab; if ( $output_file eq '' ) { chown '0', '0', "/etc/cron.d/sendmail"; chmod 0644, "/etc/cron.d/sendmail"; }; # Reflect settings in /etc/inetd.conf &update_inetd; # Create/Delete files &update_files; exit (0); #