=head1 NAME VAdmind::BootActions.pm - Manages actions to execute at boot time. =head1 SYNOPSIS The code is being included by the VAdmind platform. my $plugin = BootActions->new; =cut package VAdmind::Plugins::System::BootActions; use strict; use warnings; =head1 CONSTRUCTORS =head2 new Creates a new BootActions plugin object. =cut sub new { my $type = shift; my $self = {@_}; return bless($self, $type); } =head1 OTHER METHODS =head2 runlevel_actions Returns a list of actios to start/stop at a given runlevel. =cut sub runlevel_actions { my $self = shift; # Object itself. my $in = $self->{'in'}; my $out = $self->{'out'}; } =head2 getRunLevels Returns a list of known runlevels =cut sub getRunLevels { my $self = shift; my @rl; opendir (DIR, "/etc/rc.d"); foreach (readdir (DIR)) { if (/^rc([A-z0-9])\.d$/ || /^(boot)\.d$/) { push (@rl, $1); } } closedir(DIR); $self->{'out'}->{'xml'}->{'runlevel'} = [ sort (@rl) ]; } 1;