Chapter 31. System Customization and Automation (Topic 2.213)

This LPI Objective covers the writing of scripts and focuses on the Bash shell and Perl because they provide a balance among ease of use, popularity, and expressive power.

It is very important for senior sysadmins to be efficient with their time and their systems. For this reason, admins typically automate tasks by implementing system scripts. Recording and rerunning a common procedure can also prevent errors that come about in manual procedures because an administrator happens to mistype or forget a step.

This Topic contains only one Objective:

Objective 1: Automating Tasks Using Scripts

The candidate should be able to write simple Perl scripts that make use of modules when appropriate, use the Perl taint mode to secure data, and install Perl modules from CPAN. This Objective includes using sed and awk in scripts and using scripts to check for process execution and to generate alerts by email or pager if a process dies. Candidates should be able to write and schedule automatic execution of scripts to parse logs for alerts and email them to administrators, synchronize files across machines using rsync, monitor files for changes and generate email alerts, and write a script that notifies administrators when specified users log in or out. Weight: 3.

Objective 1: Automating Tasks Using Scripts

Scripting is one of the oldest and most powerful tools in the Unix environment. Understanding scripts is also one of the most useful ...

Get LPI Linux Certification in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.