Slaughter::API::openbsd - Perl Automation Tool Helper OpenBSD implementation
This module is the one that gets loaded upon OpenBSD systems, after the generic API implementation. It implements the platform-specific parts of our primitives.
We also attempt to load Slaughter::API::Local::openbsd, where site-specific primitives may be implemented. If the loading of this additional module fails we report no error/warning.
Slaughter::API::Local::openbsd
Now follows documentation on the available methods.
Export all subs in this package into the main namespace.
The InstallPackage primitive will allow you to install a system package.
This method uses Slaughter::Packages::openbsd.
foreach my $package ( qw! bash tcsh ! ) { if ( PackageInstalled( Package => $package ) ) { print "$package installed\n"; } else { InstallPackage( Package => $package ); } }
The following parameters are available:
The name of the package to install.
Test whether a given system package is installed.
if ( PackageInstalled( Package => "exim4-config" ) ) { print "$package installed\n"; }
The following parameters are supported:
The name of the package to test.
The return value will be a 0 if not installed, or 1 if it is.
Remove the specified system package from the system.
if ( PackageInstalled( Package => 'telnetd' ) ) { RemovePackage( Package => 'telnetd' ); }
The name of the package to remove.
Create a new user for the system.
# TODO
The following parameters are required:
The username to create.
The UID for the user.
The primary GID for the user.
You may optionally specify the GCos field to use.
Steve Kemp <steve@steve.org.uk>
Copyright (c) 2010-2015 by Steve Kemp. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license.
To install App::Slaughter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Slaughter
CPAN shell
perl -MCPAN -e shell install App::Slaughter
For more information on module installation, please visit the detailed CPAN module installation guide.