NAME
Slaughter::API::openbsd - Perl Automation Tool Helper OpenBSD implementation
SYNOPSIS
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.
AUTHOR
Steve
--
http://www.steve.org.uk/
LICENSE
Copyright (c) 2010-2012 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.
InstallPackage
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:
PackageInstalled
Test whether a given system package is installed.
This method uses Slaughter::Packages::openbsd
.
if ( PackageInstalled( Package => "exim4-config" ) )
{
print "$package installed\n";
}
The following parameters are supported:
- Package
-
The name of the package to test.
The return value will be a 0 if not installed, or 1 if it is.
RemovePackage
Remove the specified system package from the system.
This method uses Slaughter::Packages::openbsd
.
if ( PackageInstalled( Package => 'telnetd' ) )
{
RemovePackage( Package => 'telnetd' );
}
The following parameters are supported:
- Package
-
The name of the package to remove.
UserCreate
Create a new user for the system.
# TODO
The following parameters are required:
- Login
-
The username to create.
- UID
-
The UID for the user.
- GID
-
The primary GID for the user.
You may optionally specify the GCos field to use.