[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-security] Best way to patch restored raq4r?



> If I also want to integrate some custom packages in the script.
> 
> php from pkgmaster, ssh, cmu, qpopper update, mysql, webalizer2
> 
> - will it work ?
> - what is the right syntax to add them?


This is the script we use. Make sure it's in the same directory as your
.pkg files and that they are named so that they list in the order you
want them to install (we prefix our .pkg files with 01_, 02_, 03_, ...).
This system uses the cobalt installer system so the uninstallers should
all work correctly. The script will print each package name to the
screen as the install begins, including any messages that it returns. If
an install fails for some reason, the script will exit with an error. 

Please Note: This script removes each .pkg file as it gets a successful
install! Make sure you have backups before running this script!
---------------------------------------------------------------
#!/bin/sh
# 
# RaQ Package Installer
#
# Installs all packages in the current folder 
# (in alphabetical order) and then reboots the machine.
#
# Suggestion: Rename the package files with ##_packagename.pkg 
# in chronological order to ensure install order

package_list=`ls *.pkg`

for package in $package_list ; do
    echo $package
    /usr/local/sbin/cobalt_upgrade $package
    if [ $? != 0 ]; then
        echo "Error installing package $package"
        exit 1
    else
        echo "Installed."
        rm $package
    fi
done
---------------------------------------------------------------

Usually, I recommend restarting after this process to do whatever
cleanup the box might need (/sbin/reboot)
--
Greg O'Lone, President
Stretched Out Software, Inc
http://www.stretchedout.com