git-svn-id: http://svn.calculate.ru/calculate/trunk@2244 c91db197-33c1-4113-bf15-f8a5c547ca64

master
atratsevskiy 15 years ago
parent d1ba7c0c9c
commit fb44d3eabe

@ -76,19 +76,37 @@ umountres() {
}
if ! mount | grep /mnt/scratch &>/dev/null
then
echo "This program only works in the system, installed by Calculate with the option '--scratch'."
exit;
fi
#------------------------------------------------------------------------------
# Выполним проверки
#------------------------------------------------------------------------------
checkrun() {
if ! mount | grep /mnt/scratch &>/dev/null
then
echo "This program only works in the system, installed by Calculate with the option '--scratch'."
exit;
fi
if ps ax | grep "/bin/bash /usr/bin/scratch" &>/dev/null
then
echo "This program is already run."
exit;
fi
}
# Перенесем resolv.conf
if [ -f /etc/resolv.conf ]
then
mkdir -p ${BUILDER}/etc
cp /etc/resolv.conf ${BUILDER}/etc/
fi
#------------------------------------------------------------------------------
# Выполним предварительные настройки
#------------------------------------------------------------------------------
configure() {
# Перенесем resolv.conf
if [ -f /etc/resolv.conf ]
then
mkdir -p ${BUILDER}/etc
cp /etc/resolv.conf ${BUILDER}/etc/
fi
}
mountres && runchroot $*
checkrun
configure
mountres && runchroot
umountres

Loading…
Cancel
Save