#!/usr/local/bin/perl # index.cgi # Display a list of services, built from svcs command $unsafe_index_cgi = 1; require './smf-lib.pl'; &ReadParse(); &ui_print_header(undef, $text{'index_title'}, "", "help", 1, 1, 0, &help_search_link("smf", "man", "doc", "howto")); # deal with application of state changes first. this way # fmri list will show changes... if (defined($in{'change_state'})) { $cmd = "$in{'change_state'}"; # get update fmri list @update_fmris = split(/\0/, $in{'applyto'}); &svc_state_cmd("$cmd", \@update_fmris); } # service type if (defined($in{'type'})) { $svc_type = $in{'type'}; } else { $svc_type = "All"; } if (defined($in{'include_disabled'})) { $include_disabled = $in{'include_disabled'}; } else { $include_disabled = $default_include_disabled; } if ($include_disabled == 1) { $checked_include_disabled = "checked"; } else { $checked_include_disabled = ""; } # opts for svcs listing $opts = "$default_svc_options"; if (defined($in{'opts'})) { @extraopts = split(/\0/, $in{'opts'}); foreach $extraopt (@extraopts) { $opts = "$opts,$extraopt"; } } $sortopt = "$default_sortopt"; if (defined($in{'sortopt'})) { $sortopt = $in{'sortopt'}; } print "