1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #!/bin/sh
- export INSTALLOG=/tmp/sn-install
- export INSTALLPATH=/opt/secretnet/
- export SN_SNAIDE=$INSTALLPATH/bin/snaide
- export CMD_mv=/bin/mv
- export CMD_chmod=/bin/chmod
- if [ -z "$1" ]; then
- echo "The update is not performed. You must specify the installation package SecretNet LSP..." 1>/tmp/sn-update.log 2>&1
- exit 1
- fi
- SN_VERSION="1.4"
- sed s/SecretNet\ LSP\ version.*/Secret\ Net\ LSP\ $SN_VERSION/ -i /opt/secretnet/etc/secretnet-release
- SN_RH5_GRUB_PATCH=" selinux=0 vdso=0"
- SN_RH6_GRUB_PATCH=" security=default"
- grep -q $SN_RH5_GRUB_PATCH /boot/grub/grub.conf 2>/dev/null
- if [ $? = "0" ] ; then
- sed -i "s/$SN_RH5_GRUB_PATCH//g" /boot/grub/grub.conf
- fi
- grep -q $SN_RH6_GRUB_PATCH /boot/grub/grub.conf 2>/dev/null
- if [ $? = "0" ] ; then
- sed -i "s/$SN_RH6_GRUB_PATCH//g" /boot/grub/grub.conf
- fi
- if [ -e /etc/inittab.bak ] ; then
- /bin/cp -f /etc/inittab.bak /opt/secretnet/var/install/save-config/etc/inittab
- fi
- if [ -e /etc/init/prefdm.conf ] ; then
- chattr -i /etc/init/prefdm.conf 2>/dev/null
- mv /etc/init/prefdm.conf.bak /etc/init/prefdm.conf 2>/dev/null
- fi
- rpm -Uvh $1
- echo "$(uname -r)" > $INSTALLPATH/etc/kernel-name
|