Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2767 → Rev 2768

/scripts/alcasar-uninstall.sh
124,7 → 124,7
[ -e /etc/havp/havp.config.default ] && mv /etc/havp/havp.config.default /etc/havp/havp.config && echo -n "1, "
userdel -r havp 2>/dev/null && echo -n "2, "
[ -e /etc/init.d/havp.default ] && mv /etc/init.d/havp.default /etc/init.d/havp && echo -n "3, "
[ -e /lib/systemd/system/havp.service.default ] && mv /lib/systemd/system/havp.service.default /lib/systemd/system/havp.service && echo -n "4, "
[ -e /lib/systemd/system/havp.service ] && rm /lib/systemd/system/havp.service && echo -n "4, "
[ -e /etc/freshclam.conf.default ] && mv /etc/freshclam.conf.default /etc/freshclam.conf && echo -n "5"
else echo -n "already uninstalled"
fi
/scripts/alcasar-urpmi.sh
223,13 → 223,16
# Save chilli launch script (erase with new rpm one)
[ -e /etc/chilli.conf ] && cp /etc/chilli.conf /tmp/
# Install home made RPMs
urpmi --no-verify --auto rpms/$ARCH/*.rpm
for pkg in `ls rpms/$ARCH/*.rpm`
do
urpmi --no-verify --auto $pkg
done
# restore chilli launch script
[ -e /tmp/chilli.conf ] && mv /tmp/chilli.conf /etc/
# Clean the RPM cache
urpmi --clean
# the ipt-netflow RPM add the kernel module ipt_NETFLOW (the modules dependance tree need to be updated)
/sbin/depmod -a
# the ipt-netflow RPM add the kernel module ipt_NETFLOW (the modules dependance tree need to be updated). "2>/dev/null" in order not to display a error (the running kernel is not the ALCASAR one during the installation process)
/sbin/depmod -a 2>/dev/null
# test if all needed rpms are correctly installed
count_pkg=0; nb_pkg=0;
for pkg in $PACKAGES
246,19 → 249,18
exit 1
fi
# test if all custom rpms are correctly installed
#count_pkg=0; nb_pkg=0;
#for pkg in `ls rpms/$ARCH/|tr -d .rpm`
#do
# nb_pkg=`expr $nb_pkg + 1`
# if rpm -q --quiet $pkg ; then
# count_pkg=`expr $count_pkg + 1`
# else
# echo "error installing $pkg"
# fi
#done
#if [ $count_pkg -ne $nb_pkg ]
#then
# exit 1
#fi
 
count_pkg=0; nb_pkg=0;
for pkg in `ls rpms/$ARCH/|sed 's/.x86_64.rpm//'`
do
nb_pkg=`expr $nb_pkg + 1`
if rpm -q --quiet $pkg ; then
count_pkg=`expr $count_pkg + 1`
else
echo "error installing $pkg"
fi
done
if [ $count_pkg -ne $nb_pkg ]
then
exit 1
fi
exit 0