Created
July 6, 2009 21:38
-
-
Save bhenderson/141705 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#already installed? start service and exit | |
if ! [ -f /usr/bin/srvadmin-services.sh ] | |
echo "srvadmin utils not installed. installing" | |
else | |
echo "srvadmin utils installed" | |
/usr/bin/srvadmin-services.sh start | |
exit | |
fi | |
#sanity check | |
if ! lsmod | grep megaraid_sas &>/dev/null; then | |
echo "kernel module \"megaraid_sas\" not installed." | |
echo "skipping." | |
exit 1 | |
fi | |
SRCFILES=git@fedora:/fedora/dell_OM | |
INSTALLDIR=/usr/local/src/dell_OM | |
mkdir -p $INSTALLDIR | |
#copy src files over | |
rsync -aq $SRCFILES/ $INSTALLDIR | |
if ! [ -f /etc/redhat-release ] && [ `grep -c "Tikanga" /etc/redhat-release` -gt 0 ]; then | |
#add "Tikanga" to file | |
cp /etc/redhat-release /etc/redhat-release.original | |
# what happens if /etc/redhat-release doesn't exist? | |
echo Tikanga >> /etc/redhat-release | |
fi | |
#install dependencies | |
if ! rpm -q libstdc++ &>/dev/null ;then | |
yum install libstdc++.so.5 -y | |
fi | |
#install Dell OpenManage storage manager (CLI only) | |
$INSTALLDIR/linux/supportscripts/srvadmin-install.sh --storage | |
if $?; then | |
/opt/dell/srvadmin/omil/supportscripts/srvadmin-services.sh start | |
else | |
echo srvadmin-install failed. | |
fi | |
if ! [ -f /etc/fedhat-release.original ]; then | |
mv /etc/redhat-release.original /etc/redhat-release | |
fi | |
rm -rf $INSTALLDIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment