Commit 7d582610 authored by claes's avatar claes

*** empty log message ***

parent 4116892e
......@@ -13,11 +13,11 @@ fi
# Generate version help file
{
if [ ! -e $pwre_sroot/tools/pkg/deb/pwrrt/control ]; then
if [ ! -e $pwre_sroot/tools/pkg/ubu/pwrrt/control ]; then
echo "Controlfile not found"
exit 1
fi
datfile=$pwre_sroot/tools/pkg/deb/pwrrt/control
datfile=$pwre_sroot/tools/pkg/ubu/pwrrt/control
echo "<topic> version"
d=`eval date +\"%F %X\"`
......@@ -89,7 +89,7 @@ if [ "$1" == "-v" ]; then
fi
pkgroot=$pwre_broot/$pwre_target/bld/pkg/pwrrt
pkgsrc=$pwre_sroot/tools/pkg/deb/pwrrt
pkgsrc=$pwre_sroot/tools/pkg/ubu/pwrrt
# Create directories
......@@ -155,21 +155,21 @@ cp $pkgsrc/proview.cnf $pkgroot/usr/pwrrt/cnf
# Copy op to cnf
mkdir $pkgroot/usr/pwrrt/cnf/op
cp $pwre_sroot/tools/pkg/deb/op/.bashrc $pkgroot/usr/pwrrt/cnf/op
cp $pwre_sroot/tools/pkg/deb/op/.bash_profile $pkgroot/usr/pwrrt/cnf/op
#cp $pwre_sroot/tools/pkg/deb/op/.mwmrc $pkgroot/usr/pwrrt/cnf/op
cp $pwre_sroot/tools/pkg/deb/op/.rtt_start $pkgroot/usr/pwrrt/cnf/op
cp $pwre_sroot/tools/pkg/deb/op/.xtt_start $pkgroot/usr/pwrrt/cnf/op
#cp $pwre_sroot/tools/pkg/deb/op/.xsession $pkgroot/usr/pwrrt/cnf/op
cp $pwre_sroot/tools/pkg/ubu/op/.bashrc $pkgroot/usr/pwrrt/cnf/op
cp $pwre_sroot/tools/pkg/ubu/op/.bash_profile $pkgroot/usr/pwrrt/cnf/op
#cp $pwre_sroot/tools/pkg/ubu/op/.mwmrc $pkgroot/usr/pwrrt/cnf/op
cp $pwre_sroot/tools/pkg/ubu/op/.rtt_start $pkgroot/usr/pwrrt/cnf/op
cp $pwre_sroot/tools/pkg/ubu/op/.xtt_start $pkgroot/usr/pwrrt/cnf/op
#cp $pwre_sroot/tools/pkg/ubu/op/.xsession $pkgroot/usr/pwrrt/cnf/op
# Copy user to cnf
mkdir $pkgroot/usr/pwrrt/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.bashrc $pkgroot/usr/pwrrt/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.bash_profile $pkgroot/usr/pwrrt/cnf/user
#cp $pwre_sroot/tools/pkg/deb/user/.mwmrc $pkgroot/usr/pwrrt/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.rtt_start $pkgroot/usr/pwrrt/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.xtt_start $pkgroot/usr/pwrrt/cnf/user
#cp $pwre_sroot/tools/pkg/deb/user/.xsession $pkgroot/usr/pwrrt/cnf/user
cp $pwre_sroot/tools/pkg/ubu/user/.bashrc $pkgroot/usr/pwrrt/cnf/user
cp $pwre_sroot/tools/pkg/ubu/user/.bash_profile $pkgroot/usr/pwrrt/cnf/user
#cp $pwre_sroot/tools/pkg/ubu/user/.mwmrc $pkgroot/usr/pwrrt/cnf/user
cp $pwre_sroot/tools/pkg/ubu/user/.rtt_start $pkgroot/usr/pwrrt/cnf/user
cp $pwre_sroot/tools/pkg/ubu/user/.xtt_start $pkgroot/usr/pwrrt/cnf/user
#cp $pwre_sroot/tools/pkg/ubu/user/.xsession $pkgroot/usr/pwrrt/cnf/user
# Create package
echo "-- Building package"
......
Package: pwrrt
Version: 4.4.4-5
Version: 4.5.0-1
Section: base
Priority: optional
Architecture: i386
Depends: libc6 (>= 2.5-0ubuntu14), libgtk2.0-0 (>= 2.10.11-0ubuntu3), libasound2 (>= 1.0.13-1ubuntu5), libdb4.4 (>=4.4.20-8ubuntu2)
Replaces: pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44
Replaces: pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45
Maintainer: Proview <postmaster@proview.se>
Description:
Proview runtime environment
4.4.0-1 Base release
4.4.0-2
- Proview restart improved. Works with profibus.
- Ge: New fonts, Times, NC Schoolbook and Courier.
4.4.1-1
- Proview profibus restart improved.
- Statusmonitor to view status of remote nodes implemented.
- Runtime monitor to start and stop runtime in development environment implemented.
- Env variables allowed in filenames for remotelogg and nmpsbackup.
4.4.1-2
- Problems with national characters in opc_server fixed.
- Problems with memory leakage in opc_server fixed.
4.4.2-1
- Subgraphs for ventilation and circuit diagrams added.
- Baseobjects for threewayvalves, filters and dampers added.
4.4.4-1
- Function to suppress alarms in basecomponents added.
- Classes IpDistribute, IpCollect, Demux, IDemux, GetDpPtr, StoDpPtr,
Eurotherm_TC3001, Eurotherm_TC3001Aggr and more added.
4.4.4-2
- Bugfix in gtk operatorwindow, long alarmtext could cause segfault
4.4.4-3
- Bugfix in trend, disabled trend object was handled.
- Bugfix in object graph for CompModePID and CompPID.
4.4.4-4
- Bugfix in Eurotherm 3001 profibus slave and module.
- Doublebuffering in graphs with window objects could be lost.
4.4.4-5
- Fixed several bugs in rs_remote_tcpip when acting as a server.
- Bugfix in rt_neth_acp. Subscriptions were not refreshed after a remote node restarted.
4.5.0-1 Base release
......@@ -67,12 +67,12 @@ if ! grep -q "\bskiftel:" /etc/passwd; then
mkdir /home/skiftel
cp /usr/pwrrt/cnf/user/.bashrc /home/skiftel
cp /usr/pwrrt/cnf/user/.bash_profile /home/skiftel
cp /usr/pwrrt/cnf/user/.mwmrc /home/skiftel
# cp /usr/pwrrt/cnf/user/.mwmrc /home/skiftel
cp /usr/pwrrt/cnf/user/.rtt_start /home/skiftel
chmod a+x /home/skiftel/.rtt_start
cp /usr/pwrrt/cnf/user/.xtt_start /home/skiftel
chmod a+x /home/skiftel/.xtt_start
cp /usr/pwrrt/cnf/user/.xsession /home/skiftel
# cp /usr/pwrrt/cnf/user/.xsession /home/skiftel
chown -R pwrp /home/skiftel
chgrp -R pwrp /home/skiftel
......@@ -94,12 +94,12 @@ if ! grep -q "\bb55:" /etc/passwd; then
mkdir /home/b55
cp /usr/pwrrt/cnf/op/.bashrc /home/b55
cp /usr/pwrrt/cnf/op/.bash_profile /home/b55
cp /usr/pwrrt/cnf/op/.mwmrc /home/b55
# cp /usr/pwrrt/cnf/op/.mwmrc /home/b55
cp /usr/pwrrt/cnf/op/.rtt_start /home/b55
chmod a+x /home/b55/.rtt_start
cp /usr/pwrrt/cnf/op/.xtt_start /home/b55
chmod a+x /home/b55/.xtt_start
cp /usr/pwrrt/cnf/op/.xsession /home/b55
# cp /usr/pwrrt/cnf/op/.xsession /home/b55
chown -R b55 /home/b55
chgrp -R pwrp /home/b55
......@@ -113,21 +113,21 @@ if ! grep -q "\bb66:" /etc/passwd; then
# Check if group audio exist
if grep -q "\baudio:" /etc/group; then
audio="-G audio"
groups="pwrp,audio"
else
audio=""
groups="pwrp"
fi
useradd -s /bin/bash -p aae.nHgHbfUpw -g b66 -G $groups -d /home/b66 b66
if [ ! -e /home/b66 ]; then
mkdir /home/b66
cp /usr/pwrrt/cnf/op/.bashrc /home/b66
cp /usr/pwrrt/cnf/op/.bash_profile /home/b66
cp /usr/pwrrt/cnf/op/.mwmrc /home/b66
# cp /usr/pwrrt/cnf/op/.mwmrc /home/b66
cp /usr/pwrrt/cnf/op/.rtt_start /home/b66
chmod a+x /home/b66/.rtt_start
cp /usr/pwrrt/cnf/op/.xtt_start /home/b66
chmod a+x /home/b66/.xtt_start
cp /usr/pwrrt/cnf/op/.xsession /home/b66
# cp /usr/pwrrt/cnf/op/.xsession /home/b66
chown -R b66 /home/b66
chgrp -R pwrp /home/b66
......
#!/bin/bash
#
# Startscript fr PWR av Ulf Ljungdahl
# Startscript fr PWR
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
wrapper="/tmp/rt_ini_wrapper"
killer="/tmp/pwr_killer"
. /etc/pwrp_profile
umask 002
pwr_start()
create_wrapper()
{
$pwr_exe/rt_ini &
if [ ! -e $wrapper ] ; then
echo "#!/bin/bash" > $wrapper
echo "source /etc/pwrp_profile" >> $wrapper
echo "umask 002" >> $wrapper
echo "\$pwr_exe/rt_ini \$* &" >> $wrapper
chmod a+rx $wrapper
if [ ! -e $wrapper ] ;then
echo "$wrapper not writable, check permissions"
exit
fi
fi
}
pwr_stop()
create_killer()
{
rt_ini -s
sleep 5
kill -9 `ps ax | grep "rt_neth_acp" | awk '{ print $1}'`
kill -9 `ps ax | grep "rt_neth" | awk '{ print $1}'`
kill -9 `ps ax | grep "rt_qmon" | awk '{ print $1}'`
kill -9 `ps ax | grep "rt_emon" | awk '{ print $1}'`
kill -9 `ps ax | grep "rt_tmon" | awk '{ print $1}'`
kill -9 `ps ax | grep "rt_\|/pwr/exe/rs" | awk '{ print $1}'`
kill -9 `ps ax | grep "\[rt_" | awk '{ print $1}'`
kill -9 `ps ax | grep "plc_" | awk '{ print $1}'`
kill -9 `ps ax | grep "jpwr.rt" | awk '{ print $1}'`
kill -9 `ps ax | grep "rs_nmps" | awk '{ print $1}'`
kill -9 `ps ax | grep "rs_remote" | awk '{ print $1}'`
if [ -u $pwr_exe/rt_ini ]; then
user=`ls -al $pwr_exe/rt_ini | awk '{ print $3}'`
else
user=$USER
if [ ! -e $killer ] ; then
echo "#!/bin/bash" > $killer
echo "source /etc/pwrp_profile" >> $killer
echo "umask 002" >> $killer
echo "kill -9 `ps ax | grep "rt_" | awk '{ print $1}'`" >> $killer
echo "kill -9 `ps ax | grep "rs_" | awk '{ print $1}'`" >> $killer
echo "kill -9 `ps ax | grep "ra_" | awk '{ print $1}'`" >> $killer
echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer
echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer
echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer
echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer
chmod a+rx $killer
if [ ! -e $killer ] ;then
echo "$killer not writable, check permissions"
exit
fi
fi
}
echo "User $user"
eval `ipcs -s|grep ^0x|grep "[ \t]$user[ \t]"|awk '{printf "ipcrm sem %s;", $2
}'`
# remove message queues
eval `ipcs -q|grep ^0x|grep "[ \t]$user[ \t]"|awk '{printf "ipcrm msg %s;", $2
}'`
# remove shared memory
eval `ipcs -m|grep ^0x|grep "[ \t]$user[ \t]"|awk '{printf "ipcrm shm %s;", $2
}'`
pwr_start()
{
create_wrapper
if [ `whoami` == "pwrp" ];then
$wrapper
else
sudo -u pwrp $wrapper
fi
}
pwr_stop()
{
create_wrapper
if [ `whoami` == "pwrp" ];then
$wrapper -s
if [ -e $pwrp_exe/pwrp_stop.sh ]; then
source $pwrp_exe/pwrp_stop.sh
fi
else
sudo -u pwrp $wrapper -s
if [ -e $pwrp_exe/pwrp_stop.sh ]; then
sudo -u pwrp source $pwrp_exe/pwrp_stop.sh
fi
fi
while [ "`ps aux | grep -v grep | grep rt_`" != "" ] ; do sleep 1; done
}
rm /tmp/pwr*$PWR_BUS_ID
pwr_reload()
{
if [ `whoami` == "pwrp" ];then
$pwr_exe/rt_ini_wrapper -r
else
sudo -u pwrp $pwr_exe/rt_ini_wrapper -r
fi
}
#rm -f /tmp/pwr*
#id=`ipcs -s | grep $user | awk '{print $2}'`
#id1=`echo $id | awk '{print $1}'`
#id2=`echo $id | awk '{print $2}'`
#id3=`echo $id | awk '{print $3}'`
#ipcrm sem $id1
#ipcrm sem $id2
#ipcrm sem $id3
#id=`ipcs -q | grep $user | awk '{print $2}'`
#id1=`echo $id | awk '{print $1}'`
#id2=`echo $id | awk '{print $2}'`
#id3=`echo $id | awk '{print $3}'`
#ipcrm msg $id1
#ipcrm msg $id2
#ipcrm msg $id3
pwr_kill()
{
create_killer
if [ `whoami` == "pwrp" ];then
$killer
else
sudo -u pwrp $killer
fi
}
case "$1"
in
start)
echo "Startar PWR..."
#if [ 'test -x ps aux | grep plc | grep -v grep' ]
# then
# echo "PWR kr, stoppar det frst.."
# pwr_stop
# fi
echo "Startar PWR."
pwr_start
echo "Klar."
;;
stop)
echo "Stoppar PWR..."
pwr_stop
# if [ "${SAVEONCE}" != "yes" ]
# then
# save
# echo -n "ipchains-save"
# else
# echo -n "Clearing IP chains:"
# fi
echo "Klar"
;;
restart)
......@@ -105,10 +117,18 @@ case "$1"
pwr_start
echo "Klar."
;;
reload)
echo "PWR varmomstart "
pwr_reload
echo "Klar."
;;
kill)
echo "Tar bort delat minne och kvarblivna applikationer frn PWR"
pwr_kill
echo "Klar."
;;
*)
echo "Usage:{start|stop|restart}" >&2
#echo "Ingen parameter angiven, startar PWR"
#$0 start
echo "Usage:{start|stop|restart|reload|kill}" >&2
exit 1
;;
esac
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment