#!/usr/bin/perl
# BOFH exuse generator
# Written by gf
# Idea and words from http://bofh.ntk.net/ExcuseBoard.html

package BOFH;

@first = qw (
Temporary Intermittant Partial Redundant Total Multiplexed Inherent Duplicated Dual-Homed
Synchronous Bidirectional Serial Asynchronous Multiple Replicated Non-Replicated Unregistered
Non-Specific Generic Migrated Localised Resignalled Dereferenced Nullified Aborted Serious
Minor Major Extraneous Illegal Insufficient Viral Unsupported Outmoded Legacy Permanent
Invalid Deprecated Virtual Unreportable Undetermined Undiagnosable Unfiltered Static Dynamic
Delayed Immediate Nonfatal Fatal Non-Valid Unvalidated Non-Static Unreplicatable Non-Serious
);

@second = qw(
Array Systems Hardware Software Firmware Backplane Logic-Subsystem Integrity Subsystem Memory
Comms Integrity Checksum Protocol Parity Bus Timing Synchronisation Topology Transmission Reception
Stack Framing Code Programming Peripheral Environmental Loading Operation Parameter Syntax Initialisation
Execution Resource Encryption Decryption File Precondition Authentication Paging Swapfile Service Gateway
Request Proxy Media Registry Configuration Metadata Streaming Retrieval Installation Library Handler
);

@third = qw(
Interruption Destabilisation Destruction Desynchronisation Failure Dereferencing Overflow Underflow NMI
Interrupt Corruption Anomaly Seizure Override Reclock Rejection Invalidation Halt Exhaustion Infection
Incompatibility Timeout Expiry Unavailability Bug Condition Crash Dump Crashdump Stackdump Problem Lockout
);

@fourth = qw(
Error Problem Warning Signal Flag
);

sub get_excuse() {
	my $exuse;
	$exuse .= $first[rand($#first)].' ';
	$exuse .= $second[rand($#second)].' ';
	$exuse .= $third[rand($#third)];
	$exuse .= ' '.$fourth[rand($#fourth)] if (rand(10) % 2==0);
	return lc($exuse);
}

1;
