Добавлен скрипт для корректной работы slim

master
parent 70d370ba33
commit 831cfe3e9e

@ -2,6 +2,7 @@ CHANGE LOG
1.2.8
* Исправлена сборка бинарных nvidia драйверов.
* Изменено расположение скриптов bashrc и manrc.
* Добавлен скрипт для запуска,останова и перезапуска slim.
1.2.7
* Добавлено отмонтирование раздела для установки если он подключен к /media.

@ -20,9 +20,11 @@ install: all
@${CHMOD} 755 ${DESTDIR}/usr/${NAME}/install/calculate
@${CHMOD} 755 ${DESTDIR}/usr/${NAME}/install/cl-builder
@${CHMOD} 755 ${DESTDIR}/usr/${NAME}/install/cl-unmask
@${CHMOD} 755 ${DESTDIR}/usr/${NAME}/install/scripts/slimd
@${MKDIR} ${DESTDIR}/usr/bin
@${LN} ${DESTDIR}/usr/calculate/install/calculate ${DESTDIR}/usr/bin/calculate
@${LN} ${DESTDIR}/usr/calculate/install/cl-builder ${DESTDIR}/usr/bin/cl-builder
@${LN} ${DESTDIR}/usr/calculate/install/cl-unmask ${DESTDIR}/usr/bin/cl-unmask
@${LN} ${DESTDIR}/usr/calculate/install/bashrc ${DESTDIR}/usr/calculate/install/scripts/bashrc
@${LN} ${DESTDIR}/usr/calculate/install/manrc ${DESTDIR}/usr/calculate/install/scripts/manrc
@${LN} ${DESTDIR}/usr/calculate/install/scripts/slimd ${DESTDIR}/usr/bin/slimd

@ -5,7 +5,7 @@ CHECKVT=7
DISPLAYMANAGER="kdm"
#calculate#
#?calculate=CLDX#
DISPLAYMANAGER="slim"
DISPLAYMANAGER="slimd"
#calculate#
#?calculate=CLSG#
DISPLAYMANAGER="gdm"

@ -0,0 +1,54 @@
#!/bin/bash
#------------------------------------------------------------------------------
# slimd
# Copyright ©2009 Mir Calculate Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#------------------------------------------------------------------------------
stopslim() {
killall X &>/dev/null
killall -9 slim &>/dev/null
rm -f /var/run/slim.lock
exit
}
waitrun() {
while ! ps axo pid,cmd | grep $1 | grep -v grep &>/dev/null
do
sleep 1
done
}
workloop() {
trap stopslim TERM
sleep 3
waitrun /usr/bin/X
while true
do
# check is working X
if ! ps axo pid,cmd | grep /usr/bin/X | grep -v grep &>/dev/null
then
kill -9 `cat /var/run/slim.lock` &>/dev/null
rm -f /var/run/slim.lock
/usr/bin/slim
# waiting for run X
waitrun /usr/bin/X
fi
sleep 1
done
}
/usr/bin/slim && workloop &
Loading…
Cancel
Save