Commit 7d582610 authored by claes's avatar claes

*** empty log message ***

parent 4116892e
...@@ -13,11 +13,11 @@ fi ...@@ -13,11 +13,11 @@ fi
# Generate version help file # 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" echo "Controlfile not found"
exit 1 exit 1
fi fi
datfile=$pwre_sroot/tools/pkg/deb/pwrrt/control datfile=$pwre_sroot/tools/pkg/ubu/pwrrt/control
echo "<topic> version" echo "<topic> version"
d=`eval date +\"%F %X\"` d=`eval date +\"%F %X\"`
...@@ -89,7 +89,7 @@ if [ "$1" == "-v" ]; then ...@@ -89,7 +89,7 @@ if [ "$1" == "-v" ]; then
fi fi
pkgroot=$pwre_broot/$pwre_target/bld/pkg/pwrrt pkgroot=$pwre_broot/$pwre_target/bld/pkg/pwrrt
pkgsrc=$pwre_sroot/tools/pkg/deb/pwrrt pkgsrc=$pwre_sroot/tools/pkg/ubu/pwrrt
# Create directories # Create directories
...@@ -155,21 +155,21 @@ cp $pkgsrc/proview.cnf $pkgroot/usr/pwrrt/cnf ...@@ -155,21 +155,21 @@ cp $pkgsrc/proview.cnf $pkgroot/usr/pwrrt/cnf
# Copy op to cnf # Copy op to cnf
mkdir $pkgroot/usr/pwrrt/cnf/op mkdir $pkgroot/usr/pwrrt/cnf/op
cp $pwre_sroot/tools/pkg/deb/op/.bashrc $pkgroot/usr/pwrrt/cnf/op cp $pwre_sroot/tools/pkg/ubu/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/ubu/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/ubu/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/ubu/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/ubu/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/.xsession $pkgroot/usr/pwrrt/cnf/op
# Copy user to cnf # Copy user to cnf
mkdir $pkgroot/usr/pwrrt/cnf/user mkdir $pkgroot/usr/pwrrt/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.bashrc $pkgroot/usr/pwrrt/cnf/user cp $pwre_sroot/tools/pkg/ubu/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/ubu/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/ubu/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/ubu/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/ubu/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/.xsession $pkgroot/usr/pwrrt/cnf/user
# Create package # Create package
echo "-- Building package" echo "-- Building package"
......
Package: pwrrt Package: pwrrt
Version: 4.4.4-5 Version: 4.5.0-1
Section: base Section: base
Priority: optional Priority: optional
Architecture: i386 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) 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> Maintainer: Proview <postmaster@proview.se>
Description: Description:
Proview runtime environment Proview runtime environment
4.4.0-1 Base release 4.5.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.
...@@ -67,12 +67,12 @@ if ! grep -q "\bskiftel:" /etc/passwd; then ...@@ -67,12 +67,12 @@ if ! grep -q "\bskiftel:" /etc/passwd; then
mkdir /home/skiftel mkdir /home/skiftel
cp /usr/pwrrt/cnf/user/.bashrc /home/skiftel cp /usr/pwrrt/cnf/user/.bashrc /home/skiftel
cp /usr/pwrrt/cnf/user/.bash_profile /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 cp /usr/pwrrt/cnf/user/.rtt_start /home/skiftel
chmod a+x /home/skiftel/.rtt_start chmod a+x /home/skiftel/.rtt_start
cp /usr/pwrrt/cnf/user/.xtt_start /home/skiftel cp /usr/pwrrt/cnf/user/.xtt_start /home/skiftel
chmod a+x /home/skiftel/.xtt_start 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 chown -R pwrp /home/skiftel
chgrp -R pwrp /home/skiftel chgrp -R pwrp /home/skiftel
...@@ -94,12 +94,12 @@ if ! grep -q "\bb55:" /etc/passwd; then ...@@ -94,12 +94,12 @@ if ! grep -q "\bb55:" /etc/passwd; then
mkdir /home/b55 mkdir /home/b55
cp /usr/pwrrt/cnf/op/.bashrc /home/b55 cp /usr/pwrrt/cnf/op/.bashrc /home/b55
cp /usr/pwrrt/cnf/op/.bash_profile /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 cp /usr/pwrrt/cnf/op/.rtt_start /home/b55
chmod a+x /home/b55/.rtt_start chmod a+x /home/b55/.rtt_start
cp /usr/pwrrt/cnf/op/.xtt_start /home/b55 cp /usr/pwrrt/cnf/op/.xtt_start /home/b55
chmod a+x /home/b55/.xtt_start 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 chown -R b55 /home/b55
chgrp -R pwrp /home/b55 chgrp -R pwrp /home/b55
...@@ -113,21 +113,21 @@ if ! grep -q "\bb66:" /etc/passwd; then ...@@ -113,21 +113,21 @@ if ! grep -q "\bb66:" /etc/passwd; then
# Check if group audio exist # Check if group audio exist
if grep -q "\baudio:" /etc/group; then if grep -q "\baudio:" /etc/group; then
audio="-G audio" groups="pwrp,audio"
else else
audio="" groups="pwrp"
fi fi
useradd -s /bin/bash -p aae.nHgHbfUpw -g b66 -G $groups -d /home/b66 b66 useradd -s /bin/bash -p aae.nHgHbfUpw -g b66 -G $groups -d /home/b66 b66
if [ ! -e /home/b66 ]; then if [ ! -e /home/b66 ]; then
mkdir /home/b66 mkdir /home/b66
cp /usr/pwrrt/cnf/op/.bashrc /home/b66 cp /usr/pwrrt/cnf/op/.bashrc /home/b66
cp /usr/pwrrt/cnf/op/.bash_profile /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 cp /usr/pwrrt/cnf/op/.rtt_start /home/b66
chmod a+x /home/b66/.rtt_start chmod a+x /home/b66/.rtt_start
cp /usr/pwrrt/cnf/op/.xtt_start /home/b66 cp /usr/pwrrt/cnf/op/.xtt_start /home/b66
chmod a+x /home/b66/.xtt_start 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 chown -R b66 /home/b66
chgrp -R pwrp /home/b66 chgrp -R pwrp /home/b66
......
#!/bin/bash #!/bin/bash
# #
# Startscript fr PWR av Ulf Ljungdahl # Startscript fr PWR
# #
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 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 . /etc/pwrp_profile
umask 002
create_wrapper()
pwr_start()
{ {
$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 if [ ! -e $killer ] ; then
sleep 5 echo "#!/bin/bash" > $killer
kill -9 `ps ax | grep "rt_neth_acp" | awk '{ print $1}'` echo "source /etc/pwrp_profile" >> $killer
kill -9 `ps ax | grep "rt_neth" | awk '{ print $1}'` echo "umask 002" >> $killer
kill -9 `ps ax | grep "rt_qmon" | awk '{ print $1}'`
kill -9 `ps ax | grep "rt_emon" | awk '{ print $1}'` echo "kill -9 `ps ax | grep "rt_" | awk '{ print $1}'`" >> $killer
kill -9 `ps ax | grep "rt_tmon" | awk '{ print $1}'` echo "kill -9 `ps ax | grep "rs_" | awk '{ print $1}'`" >> $killer
kill -9 `ps ax | grep "rt_\|/pwr/exe/rs" | awk '{ print $1}'` echo "kill -9 `ps ax | grep "ra_" | awk '{ print $1}'`" >> $killer
kill -9 `ps ax | grep "\[rt_" | awk '{ print $1}'`
kill -9 `ps ax | grep "plc_" | awk '{ print $1}'` echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer
kill -9 `ps ax | grep "jpwr.rt" | awk '{ print $1}'` echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer
kill -9 `ps ax | grep "rs_nmps" | awk '{ print $1}'` echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer
kill -9 `ps ax | grep "rs_remote" | awk '{ print $1}'` echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer
if [ -u $pwr_exe/rt_ini ]; then
user=`ls -al $pwr_exe/rt_ini | awk '{ print $3}'` chmod a+rx $killer
else if [ ! -e $killer ] ;then
user=$USER echo "$killer not writable, check permissions"
exit
fi 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 pwr_start()
eval `ipcs -m|grep ^0x|grep "[ \t]$user[ \t]"|awk '{printf "ipcrm shm %s;", $2 {
}'` 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 if [ -e $pwrp_exe/pwrp_stop.sh ]; then
source $pwrp_exe/pwrp_stop.sh source $pwrp_exe/pwrp_stop.sh
fi 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* pwr_kill()
#id=`ipcs -s | grep $user | awk '{print $2}'` {
#id1=`echo $id | awk '{print $1}'` create_killer
#id2=`echo $id | awk '{print $2}'` if [ `whoami` == "pwrp" ];then
#id3=`echo $id | awk '{print $3}'` $killer
#ipcrm sem $id1 else
#ipcrm sem $id2 sudo -u pwrp $killer
#ipcrm sem $id3 fi
#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
} }
case "$1" case "$1"
in in
start) start)
echo "Startar PWR..." echo "Startar PWR."
#if [ 'test -x ps aux | grep plc | grep -v grep' ]
# then
# echo "PWR kr, stoppar det frst.."
# pwr_stop
# fi
pwr_start pwr_start
echo "Klar." echo "Klar."
;; ;;
stop) stop)
echo "Stoppar PWR..." echo "Stoppar PWR..."
pwr_stop pwr_stop
# if [ "${SAVEONCE}" != "yes" ]
# then
# save
# echo -n "ipchains-save"
# else
# echo -n "Clearing IP chains:"
# fi
echo "Klar" echo "Klar"
;; ;;
restart) restart)
...@@ -105,10 +117,18 @@ case "$1" ...@@ -105,10 +117,18 @@ case "$1"
pwr_start pwr_start
echo "Klar." 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 "Usage:{start|stop|restart|reload|kill}" >&2
#echo "Ingen parameter angiven, startar PWR"
#$0 start
exit 1 exit 1
;; ;;
esac 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