sysupgrade installation and usage

Return to Main Contents

Installation

Only two files are required: a configuration file and a launcher.

The configuration file should be placed under /etc/sysupgrade.conf by default. The launcher is called sysupgrade. A sensible location for this is /usr/local/sbin/sysupgrade. Every time the launcher is run it will include the configuration file and then download a new copy of the upgrade script from the web location named by the SOURCE configuration variable. This script will be placed under /usr/local/lib/sysupgrade.sh and then executed. This ensures users will always have the latest version of the upgrade program.

Please check configuration file /etc/sysupgrade.conf before using sysupgrade.

Configuration

Using any plain text editor modify configuration file as suggested below before launching sysupgrade for the first time. I embedded many comments in the file to help you.

The most important variable is SOURCE which is the location of the last version of the update script. If you are concerned about executing script code downloaded from my web site for security reasons, you may want to change this to a local copy of the script, which can be updated and inspected manually for enhanced security. The local copy can reside on a local HTTP server:

readonly SOURCE="http://YOUR_SERVER_NAME/PATH/sysupgrade.sh"

or you can use a static local file simple by leaving this variable empty:

readonly SOURCE=""

This way no download will occur: the script named by the SCRIPT configuration variable will be executed unchanged. You must place a copy of this script manually there. By default its path is /usr/local/lib/sysupgrade.sh.

Sysupgrade will save a transcript of the messagges printed on your terminal when last executed to text file /root/sysupgrade.typescript. I find this feature useful because I don't want to wait and watch the terminal for the entire usually slow update process. I simply inspect this file when the upgrade has finished, before or after rebooting the system. If you also want the typescript file to be automatically sent to an help desk or system administrator or yourself in the event that problems arise, set destination email in configuration variable HDMAIL. Also don't forget to set the from field for emails in HDMAILFROM and of course the SMTP server the machine is allowed to use in HDMAILSMTP.

Usage

# sysupgrade

Its that simple :-)

Just remember the first time you edit a configuration file to save a default version before by appending the .bak-default suffix to the filename, e.g.:

# cp filename.ext filename.ext.bak-default
# vi filename.ext

The presence of a default file will allow sysupgrade to try to automatically merge your modifications when new versions of the configuration file are installed. Without a default file sysupgrade can't even know what you have changed from the old default version and will do nothing except for issuing a warning.