Commit acde6319 authored by claes's avatar claes

Debian package for development and runtime release created

parent 620c063c
pwrp()
{
source $pwra_db/pwra_env.sh $@
}
alias sdf="source $pwra_db/pwra_env.sh set project"
alias pwrc="wb_cmd"
alias pwrs="wb_start.sh pwrp pwrp"
!
! pwr_volumelist.dat
!
! Description: This file contains all volumes, with identity,
! name and project.
!
!
! Baseclasses 0.0.1.1-254
!
! Volumename Identity Project
! ---------- -------- -------
NMps 0.0.1.1 SSAB
TLog 0.0.1.2 SSAB
SSAB 0.0.1.3 SSAB
!
!
! Userclass volumes 0.0.2-254.1-254
!
! Volymename Identity Project
! ---------- -------- -------
!
! User volumes 0.1-254.1-254.1-254
!
! Volumename Identity Project
! ---------- ________ _______
#! /bin/bash
#
#
#
pwra_set_func()
{
local cmd
local baseroot
local project
if [ -z $1 ]; then
echo "Qualifier is missing"
return
fi
cmd="base"
if [ $1 = $cmd ] || [ ${cmd#$1} != $cmd ]; then
# Command is "set base"
basename=$2
baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\b"$basename"\b" | grep "\b"base"\b" | awk '{print $3}'`
if [ -z $baseroot ]; then
echo "Unable to find base '$2'"
return
fi
baseroot=${baseroot%/}
if [ ! -e "$baseroot" ]; then
echo "Base $baseroot doesn't exist"
else
if [ ! -e $baseroot/$os/$hw/exp/exe/pwrp_env.sh ]; then
echo "Not a base directory: $baseroot"
return
fi
source $baseroot/$os/$hw/exp/exe/pwrp_env.sh set baseroot $baseroot
fi
return
fi
cmd="baseroot"
if [ $1 = $cmd ] || [ ${cmd#$1} != $cmd ]; then
# Command is "set baseroot"
baseroot=$2
baseroot=${baseroot%/}
if [ ! -e "$baseroot" ]; then
echo "Base $baseroot doesn't exist"
else
if [ ! -e $baseroot/$os/$hw/exp/exe/pwrp_env.sh ]; then
echo "Not a base directory: $baseroot"
return
fi
source $baseroot/$os/$hw/exp/exe/pwrp_env.sh set baseroot $baseroot
fi
return
fi
cmd="project"
if [ $1 = $cmd ] || [ ${cmd#$1} != $cmd ]; then
# Command is "set project"
project=$2
basename=`eval cat $pwra_db/pwr_projectlist.dat | grep "^"$project"\b" | awk '{print $2}'`
if [ -z $basename ]; then
echo "Unable to find project '$2'"
return
fi
baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\b"$basename"\b" | grep "\b"base"\b" | awk '{print $3}'`
if [ -z $baseroot ]; then
echo "Unable to find base '$2'"
return
fi
baseroot=${baseroot%/}
if [ ! -e "$baseroot" ]; then
echo "Base $baseroot doesn't exist"
else
if [ ! -e $baseroot/$os/$hw/exp/exe/pwrp_env.sh ]; then
echo "Not a base directory: $baseroot"
return
fi
source $baseroot/$os/$hw/exp/exe/pwrp_env.sh set baseroot $baseroot
source $baseroot/$os/$hw/exp/exe/pwrp_env.sh set project $project
export PS1='\u@\h/$pwrp_projectname/-.\W> '
fi
return
fi
if [ -z $pwr_exe ]; then
echo "No project is defined"
return
fi
source $pwr_exe/pwrp_env.sh set $1 $2 $3
}
pwra_help_func()
{
source $pwr_exe/pwrp_env.sh $@
cat << EOF
pwra_env.sh - Utilities for pwr project environment
help - Display help
set base 'distribution' - Setup environment to proview base distribution
set baseroot 'root' - Setup environment to proview base distribution
EOF
}
pwra_parse ()
{
platform="x86_linux"
os="os_linux"
hw="hw_x86"
#mysql_socket="--socket /var/lib/mysql/mysql.sock"
local cmd
cmd="help"
if [ -z $1 ] || [ $1 = $cmd ] || [ ${cmd#$1} != $cmd ]; then
pwra_help_func $2 $3
return
fi
cmd="set"
if [ $1 = $cmd ] || [ ${cmd#$1} != $cmd ]; then
pwra_set_func $2 $3
return
fi
if [ -z $pwr_exe ]; then
echo "No project is defined"
return
fi
source $pwr_exe/pwrp_env.sh $@
}
pwra_parse $@
# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
umask 022
# the rest of this file is commented out.
# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# set PATH so it includes user's private bin if it exists
#if [ -d ~/bin ] ; then
# PATH=~/bin:"${PATH}"
#fi
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files for examples
source /etc/pwrp_profile
# If running interactively, then:
if [ "$PS1" ]; then
# enable color support of ls and also add handy aliases
eval `dircolors -b`
alias ls='ls --color=auto'
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
# set a fancy prompt
PS1='\u@\h:\w\$ '
# If this is an xterm set the title to user@host:dir
#case $TERM in
#xterm*)
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
# ;;
#*)
# ;;
#esac
fi
!!
!! Root Menu Description
!!
Menu DefaultRootMenu
{
"Root Menu" f.title
"XTT OP-bilder" f.exec "~/.xtt_start &"
! "XTT" f.exec "~/.xtt_start"
! "RTT" f.exec "/usr/bin/X11/xterm -T RTT -e ~/.rtt_start &"
"Xterm" f.exec "/usr/bin/X11/xterm -T XTerm -sb -right &"
"Klocka" f.exec "/usr/bin/X11/xclock &"
"Miniraknare" f.exec "/usr/bin/X11/xcalc &"
! "Shuffle Up" f.circle_up
! "Shuffle Down" f.circle_down
"Refresh" f.refresh
! "Pack Icons" f.pack_icons
! "Toggle Behavior..." f.set_behavior
no-label f.separator
! "Starta om X" f.restart
"Logga ut" f.quit_mwm
"Starta om dator" f.exec "/usr/bin/rebootreq &"
"Stang av dator" f.exec "/usr/bin/haltreq &"
}
!!
!! Default Window Menu
!!
Menu DefaultWindowMenu
{
"Make Pinned" f.toggle_pin_state
no-label f.separator
Restore _R Alt<Key>F5 f.restore
Move _M Alt<Key>F7 f.move
Size _S Alt<Key>F8 f.resize
Minimize _n Alt<Key>F9 f.minimize
Maximize _x Alt<Key>F10 f.maximize
Raise _a Alt<Key>F2 f.raise
Lower _L Alt<Key>F3 f.lower
no-label f.separator
Close _C Alt<Key>F4 f.kill
}
!!
!! Default Key Bindings
!!
Keys DefaultKeyBindings
{
Shift<Key>Escape window|icon f.post_wmenu
Alt<Key>space window|icon f.post_wmenu
Alt<Key>Tab root|icon|window f.next_key
Alt Shift<Key>Tab root|icon|window f.prev_key
Alt<Key>Escape root|icon|window f.circle_down
Alt Shift<Key>Escape root|icon|window f.circle_up
Alt Shift Ctrl<Key>exclam root|icon|window f.set_behavior
Alt<Key>F6 window f.next_key transient
Alt Shift<Key>F6 window f.prev_key transient
Shift<Key>F10 icon f.post_wmenu
Alt Shift<Key>Delete root|icon|window f.restart
}
!!
!! Button Binding Description(s)
!!
!! These can be used anywhere
!!
Buttons DefaultButtonBindings
{
<Btn1Down> icon|frame f.raise
<Btn3Down> icon|frame f.post_wmenu
<Btn3Down> root f.menu DefaultRootMenu
}
!!
!! These are some example bindings that you might use if your
!! keyboardFocusPolicy is "explicit". Note that to use these, you'll
!! have to change the Mwm*buttonBindings resource in Mwm to
!! ExplicitButtonBindings instead of DefaultButtonBindings.
!!
Buttons ExplicitButtonBindings
{
<Btn1Down> frame|icon f.raise
<Btn3Down> frame|icon f.post_wmenu
<Btn3Down> root f.menu DefaultRootMenu
! <Btn1Up> icon f.restore
Alt<Btn1Down> window|icon f.lower
! Alt<Btn2Down> window|icon f.resize
! Alt<Btn3Down> window|icon f.move
}
!! These are some example bindings that you might use if your
!! keyboardFocusPolicy is "pointer". Note that to use these, you'll
!! have to change the Mwm*buttonBindings resource in Mwm to
!! PointerButtonBindings instead of DefaultButtonBindings.
!!
Buttons PointerButtonBindings
{
<Btn1Down> frame|icon f.raise
<Btn3Down> frame|icon f.post_wmenu
<Btn3Down> root f.menu DefaultRootMenu
<Btn1Down> window f.raise
! <Btn1Up> icon f.restore
Alt<Btn1Down> window|icon f.lower
! Alt<Btn2Down> window|icon f.resize
! Alt<Btn3Down> window|icon f.move
}
!include-menu-defs
#Automatically generated file. Do not edit (see /usr/doc/menu/html/index.html)
Menu "/Debian/Apps/Editors"
{
"Editors" f.title
"Emacs 20" f.exec "/usr/bin/emacs20 &"
"NEdit" f.exec "/usr/bin/X11/nedit &"
"Xedit" f.exec "xedit &"
}
Menu "/Debian/Apps/Graphics"
{
"Graphics" f.title
"Bitmap" f.exec "bitmap &"
}
Menu "/Debian/Apps/Math"
{
"Math" f.title
"Xcalc" f.exec "xcalc &"
"bc" f.exec "x-terminal-emulator -T 'bc' -e /usr/bin/bc &"
"dc" f.exec "x-terminal-emulator -T 'dc' -e /usr/bin/dc &"
}
Menu "/Debian/Apps/Net"
{
"Net" f.title
"Lynx" f.exec "x-terminal-emulator -T 'Lynx' -e /usr/bin/lynx &"
"Telnet" f.exec "x-terminal-emulator -T 'Telnet' -e telnet &"
"Xbiff" f.exec "xbiff &"
}
Menu "/Debian/Apps/Programming"
{
"Programming" f.title
"Gdb" f.exec "x-terminal-emulator -T 'Gdb' -e /usr/bin/gdb &"
"Python (v2.1)" f.exec "x-terminal-emulator -T 'Python (v2.1)' -e /usr/bin/python2.1 &"
"Tclsh8.0" f.exec "x-terminal-emulator -T 'Tclsh8.0' -e /usr/bin/tclsh8.0 &"
"Tclsh8.2" f.exec "x-terminal-emulator -T 'Tclsh8.2' -e /usr/bin/tclsh8.2 &"
"Tclsh8.3" f.exec "x-terminal-emulator -T 'Tclsh8.3' -e /usr/bin/tclsh8.3 &"
"TkWish8.0" f.exec "x-terminal-emulator -T 'TkWish8.0' -e /usr/bin/wish8.0 &"
"TkWish8.3" f.exec "/usr/bin/wish8.3 &"
}
Menu "/Debian/Apps/Shells"
{
"Shells" f.title
"Bash" f.exec "x-terminal-emulator -T 'Bash' -e /bin/bash -login &"
"Sh" f.exec "x-terminal-emulator -T 'Sh' -e /bin/sh -login &"
"Tcsh" f.exec "x-terminal-emulator -T 'Tcsh' -e /usr/bin/tcsh &"
}
Menu "/Debian/Apps/System/Admin"
{
"Admin" f.title
"Lilo-config" f.exec "x-terminal-emulator -T 'Lilo-config' -e /usr/sbin/su-to-root -p root -c /usr/sbin/liloconfig &"
"gpm-config" f.exec "x-terminal-emulator -T 'gpm-config' -e /usr/sbin/su-to-root -p root -c /usr/sbin/gpmconfig &"
}
Menu "/Debian/Apps/System"
{
"System" f.title
"Admin" f.menu "/Debian/Apps/System/Admin"
"Task selector" f.exec "x-terminal-emulator -T 'Task selector' -e su-to-root /usr/bin/tasksel &"
"Top" f.exec "x-terminal-emulator -T 'Top' -e /usr/bin/top &"
"Xconsole" f.exec "xconsole &"
"Xload" f.exec "xload &"
"Xvidtune" f.exec "xvidtune &"
"pstree" f.exec "/etc/alternatives/x-terminal-emulator -e /usr/bin/pstree.x11 &"
}
Menu "/Debian/Apps/Tools"
{
"Tools" f.title
"Editres" f.exec "editres &"
"Oclock" f.exec "oclock &"
"X Window Snapshot" f.exec "xwd | xwud &"
"Xclipboard" f.exec "xclipboard &"
"Xclock (analog)" f.exec "xclock -analog &"
"Xclock (digital)" f.exec "xclock -digital -update 1 &"
"Xcutsel" f.exec "xcutsel &"
"Xev" f.exec "x-terminal-emulator -e xev &"
"Xfontsel" f.exec "xfontsel &"
"Xkill" f.exec "xkill &"
"Xmag" f.exec "xmag &"
"Xrefresh" f.exec "xrefresh &"
}
Menu "/Debian/Apps/Viewers"
{
"Viewers" f.title
"GV" f.exec "/usr/bin/X11/gv &"
"XDvi" f.exec "/usr/bin/xdvi &"
"Xditview" f.exec "xditview &"
}
Menu "/Debian/Apps"
{
"Apps" f.title
"Editors" f.menu "/Debian/Apps/Editors"
"Graphics" f.menu "/Debian/Apps/Graphics"
"Math" f.menu "/Debian/Apps/Math"
"Net" f.menu "/Debian/Apps/Net"
"Programming" f.menu "/Debian/Apps/Programming"
"Shells" f.menu "/Debian/Apps/Shells"
"System" f.menu "/Debian/Apps/System"
"Tools" f.menu "/Debian/Apps/Tools"
"Viewers" f.menu "/Debian/Apps/Viewers"
}
Menu "/Debian/Games/Toys"
{
"Toys" f.title
"Xeyes" f.exec "xeyes &"
"Xlogo" f.exec "xlogo &"
}
Menu "/Debian/Games"
{
"Games" f.title
"Toys" f.menu "/Debian/Games/Toys"
}
Menu "/Debian/Help"
{
"Help" f.title
"Info" f.exec "x-terminal-emulator -T 'Info' -e info &"
"Xman" f.exec "xman &"
}
Menu "/Debian/Screen/Root-window"
{
"Root-window" f.title
"Xsetroot" f.exec "xsetroot &"
}
Menu "/Debian/Screen/Save"
{
"Save" f.title
"Beforelight" f.exec "beforelight &"
}
Menu "/Debian/Screen"
{
"Screen" f.title
"Root-window" f.menu "/Debian/Screen/Root-window"
"Save" f.menu "/Debian/Screen/Save"
}
Menu "/Debian/XShells"
{
"XShells" f.title
"XTerm" f.exec "xterm &"
"XTerm (Unicode)" f.exec "uxterm &"
}
Menu "/Debian"
{
"Debian" f.title
"Apps" f.menu "/Debian/Apps"
"Games" f.menu "/Debian/Games"
"Help" f.menu "/Debian/Help"
"Screen" f.menu "/Debian/Screen"
"XShells" f.menu "/Debian/XShells"
}
#!/bin/sh
ource /etc/pwrp_profile
$pwr_exe/rt_rtt
xsetroot -solid darkcyan
xhost +localhost
~/.xtt_start
xset s off s noblank s noexpose -dpms
exec mwm
#!/bin/sh
source /etc/pwrp_profile
$pwr_exe/rt_xtt &
#!/bin/bash
# Get version
if [ -e $pwr_inc/pwr_version.h ]; then
ver=`eval cat $pwr_inc/pwr_version.h | grep "\bpwrv_cWbdbVersionShortStr\b" | awk '{print $3}'`
if [ -z $ver ]; then
echo "Unable to get pwr version"
ver="V00"
fi
ver=${ver:2:2}
fi
pkgroot=$pwre_broot/$pwre_target/bld/pkg/pwr$ver
pkgsrc=$pwre_sroot/tools/pkg/deb/pwr
echo "-- Building pwr$ver"
# Create directories
mkdir -p $pkgroot/DEBIAN
mkdir -p $pkgroot/usr/share/doc/pwr$ver
mkdir -p $pkgroot/usr/pwrp
mkdir -p $pkgroot/etc
find $pkgroot -type d | xargs chmod 755
# control
cp $pkgsrc/control $pkgroot/DEBIAN
echo "#!/bin/sh" > $pkgroot/DEBIAN/postinst
echo "ver=\"$ver\"" >> $pkgroot/DEBIAN/postinst
echo "pwre_target=\"$pwre_target\"" >> $pkgroot/DEBIAN/postinst
cat $pkgsrc/postinst >> $pkgroot/DEBIAN/postinst
chmod a+x $pkgroot/DEBIAN/postinst
cp $pkgsrc/prerm $pkgroot/DEBIAN
# copyright
cp $pkgsrc/copyright $pkgroot/usr/share/doc/pwr$ver
# changelog
cp $pkgsrc/changelog $pkgroot/usr/share/doc/pwr$ver
gzip -fq --best $pkgroot/usr/share/doc/pwr$ver/changelog
# changelog.Debian
cp $pkgsrc/changelog.Debian $pkgroot/usr/share/doc/pwr$ver
gzip -fq --best $pkgroot/usr/share/doc/pwr$ver/changelog.Debian
# Man pages
mkdir -p $pkgroot/usr/share/man/man1
cp $pkgsrc/pwr.1 $pkgroot/usr/share/man/man1/pwr.1
gzip -fq --best $pkgroot/usr/share/man/man1/pwr.1
# Copy proview
mkdir $pkgroot/usr/pwr$ver
currentdir="`eval pwd`"
tarfile=$pwre_broot/$pwre_target/bld/pkg/pwrtmp.tar
cd $pwre_broot
echo "-- copy release to package tree"
tar -cf $tarfile $pwre_target/exp
cd $pkgroot/usr/pwr$ver
tar -xf $tarfile
rm $tarfile
cd $currentdir
# Copy configuration files to cnf
cp $pkgsrc/proview.cnf $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf
cp $pkgsrc/pwrp_profile $pkgroot/etc
chmod a+x $pkgroot/etc/pwrp_profile
# Copy adm files to cnf
cp $pwre_sroot/tools/pkg/deb/adm/pwr_setup.sh $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf
echo "pwrp set base V${ver:0:1}.${ver:1:1}" >> $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/pwr_setup.sh
chmod a+x $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/pwr_setup.sh
cp $pwre_sroot/tools/pkg/deb/adm/pwra_env.sh $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf
chmod a+x $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/pwra_env.sh
cp $pwre_sroot/tools/pkg/deb/adm/pwr_volumelist.dat $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf
# Copy user to cnf
mkdir $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.bashrc $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.bash_profile $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.mwmrc $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.rtt_start $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.xtt_start $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.xsession $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
# Create package
echo "-- Building package"
if which fakeroot > /dev/null; then
fakeroot dpkg -b $pkgroot $pwre_broot/$pwre_target/bld/pkg
else
dpkg -b $pkgroot $pwre_broot/$pwre_target/bld/pkg
fi
rm -r $pkgroot
Proview V3.4b (3.4.1-1)
\ No newline at end of file
Proview. See also normal changelog file.
\ No newline at end of file
Package: pwr40
Version: 4.0.1-1
Section: base
Priority: optional
Architecture: i386
Depends: libc6 (>= 2.2.4-4)
Replaces: pwrrt,pwr34,pwr39
Maintainer: Proview <postmaster@proview.se>
Description: Proview development and runtime environment package
Proview development and runtime environment
Proview
Copyright: SSAB Oxelsund AB <ssabox.com>
2003-11-21
The home page of Proview is at:
http://www.proview.se
#!/bin/sh
set -e
# ver=""
# pwre_target=""
echo "Here in postinst..."
# Automatically added by dh_installdocs
if [ "$1" = "configure" ]; then
if [ -d /usr/doc -a ! -e /usr/doc/pwrtest -a -d /usr/share/doc/pwrtest ]; then
ln -sf ../share/doc/pwrtest /usr/doc/pwrtest
fi
fi
# End automatically added section
aroot="/pwrp/adm"
# Create group pwrp
if ! grep -q "\bpwrp:" /etc/group; then
echo "-- Add group pwrp"
groupadd pwrp
fi
if ! grep -q "\bpwrp:" /etc/passwd; then
echo "-- Add user pwrp"
new_user=1
useradd -s /bin/bash -p aaupl/kQs1p3U -g pwrp -d /home/pwrp pwrp
if [ ! -e /home/pwrp ]; then
mkdir /home/pwrp
cp /usr/pwr$ver/$pwre_target/exp/cnf/user/.bashrc /home/pwrp
cp /usr/pwr$ver/$pwre_target/exp/cnf/user/.bash_profile /home/pwrp
cp /usr/pwr$ver/$pwre_target/exp/cnf/user/.mwmrc /home/pwrp
cp /usr/pwr$ver/$pwre_target/exp/cnf/user/.rtt_start /home/pwrp
cp /usr/pwr$ver/$pwre_target/exp/cnf/user/.xtt_start /home/pwrp
cp /usr/pwr$ver/$pwre_target/exp/cnf/user/.xsession /home/pwrp
chown -R pwrp /home/pwrp
chgrp -R pwrp /home/pwrp
fi
fi
echo "Change owner of files to pwrp"
chown -R pwrp /usr/pwr$ver
chgrp -R pwrp /usr/pwr$ver
chmod u+s /usr/pwr$ver/$pwre_target/exp/exe/rt_ini
chmod u+s /usr/pwr$ver/$pwre_target/exp/exe/rt_rtt
chmod u+s /usr/pwr$ver/$pwre_target/exp/exe/rt_xtt
chmod u+s /usr/pwr$ver/$pwre_target/exp/exe/rt_bck
chmod u+s /usr/pwr$ver/$pwre_target/exp/exe/wb_adm
# Copy configuration files
new_cnf=0
if [ ! -e /etc/proview.cnf ]; then
cp /usr/pwr$ver/$pwre_target/exp/cnf/proview.cnf /etc
new_cnf=1
fi
# Add pwrp_profile to profile
if ! grep -q "/etc/pwrp_profile\b" /etc/profile; then
cat >> /etc/profile <<-EOF
if [ -e /etc/pwrp_profile ]; then
source /etc/pwrp_profile
fi
EOF
fi
if [ ! -e $aroot/db ]; then
mkdir -p $aroot/db
fi
cp /usr/pwr$ver/$pwre_target/exp/cnf/pwra_env.sh $aroot/db
cp /usr/pwr$ver/$pwre_target/exp/cnf/pwr_setup.sh $aroot/db
if [ ! -e $aroot/db/pwr_volumelist.dat ]; then
cp /usr/pwr$ver/$pwre_target/exp/cnf/pwr_volumelist.dat $aroot/db
fi
if [ ! -e $aroot/db/pwr_projectlist.dat ]; then
echo "%base V${ver:0:1}.${ver:1:1} /usr/pwr$ver" > $aroot/db/pwr_projectlist.dat
fi
if ! grep -q "^%base\b" $aroot/db/pwr_projectlist.dat | grep "\bV${ver:0:1}.${ver:1:1}\b" ; then
echo "%base V${ver:0:1}.${ver:1:1} /usr/pwr$ver" >> $aroot/db/pwr_projectlist.dat
fi
chgrp pwrp $pwra_db
chmod g+w $pwra_db
chgrp pwrp $pwra_db/*
chmod g+w $pwra_db/*
chgrp pwrp /pwrp
chmod g+w /pwrp
chmod a+w /usr/pwr$ver/$pwre_target/exp/load/*.dbs
#!/bin/sh
set -e
echo "Here in prerm..."
# Automatically added by dh_installdocs
if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/pwrtest ]; then
rm -f /usr/doc/pwrtest
fi
# End automatically added section
#
# Configuration file for Proview
#
# Default QCOM Bus Id
#
qcomBusId 517
#
# Web directory
#
webDirectory /var/www
PWR(1) Proview Manuals PWR(1)
NAME
pwr - start and stop Proview runtime environment
SYNOPSIS
pwr [start][stop]
DESCRIPTION
Start and stop command for Proview runtime environment.
OPTIONS
start Start Proview runtime environment.
stop Stop Proview runtime environment.
FILES
/etc/pwrp_profile
The system wide configuration file..
AUTHOR
Written by CS.
SEE ALSO
pwr(5)
Proview Last change: Nov 2003
bus_id=""
if [ -e /etc/proview.cnf ]; then
bus_id=`eval cat /etc/proview.cnf | grep "\\bqcomBusId\\b" | awk '{print $2}'`
fi
if [ -e /etc/proview.cnf ]; then
web_dir=`eval cat /etc/proview.cnf | grep "\\bwebDirectory\\b" | awk '{print $2}'`
fi
export PWR_BUS_ID=$bus_id
export pwrb_root=/usr/pwrrt
export pwrp_root=/pwrp
export pwr_exe=$pwrb_root/exe
export pwr_lib=$pwrb_root/lib
export pwr_obj=$pwrb_root/obj
export pwr_inc=$pwrb_root/inc
export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwrp_exe=$pwrp_root/x86_linux/exe
export pwrp_lib=$pwrp_root/x86_linux/lib
export pwrp_obj=$pwrp_root/x86_linux/obj
export pwrp_lis=$pwrp_root/x86_linux/lis
export pwrp_inc=$pwrp_root/common/inc
export pwrp_load=$pwrp_root/common/load
export pwrp_log=$pwrp_root/common/log
export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/pwrp/adm/db
export jdk_home=/usr/local/jdk1.3/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
export DISPLAY=$REMOTEHOST:0.0
#symbols to define start/stop commands for PWR
alias pwr_stop='/etc/init.d/pwr stop'
alias pwr_stop.sh="/etc/init.d/pwr stop"
alias pwr_start="/etc/init.d/pwr start"
alias pwr="/etc/init.d/pwr"
alias boot="/usr/bin/sudo /sbin/reboot"
#!/bin/bash
# Get version
if [ -e $pwr_inc/pwr_version.h ]; then
ver=`eval cat $pwr_inc/pwr_version.h | grep "\bpwrv_cWbdbVersionShortStr\b" | awk '{print $3}'`
if [ -z $ver ]; then
echo "Unable to get pwr version"
ver="V00"
fi
ver=${ver:2:2}
fi
pkgroot=$pwre_broot/$pwre_target/bld/pkg/pwrrt
pkgsrc=$pwre_sroot/tools/pkg/deb/pwrrt
# Create directories
echo "-- Create package tree"
mkdir -p $pkgroot/DEBIAN
mkdir -p $pkgroot/usr/share/doc/pwrrt
mkdir -p $pkgroot/etc/init.d
find $pkgroot -type d | xargs chmod 755
# control
cp $pkgsrc/control $pkgroot/DEBIAN
cp $pkgsrc/postinst $pkgroot/DEBIAN
cp $pkgsrc/prerm $pkgroot/DEBIAN
# copyright
cp $pkgsrc/copyright $pkgroot/usr/share/doc/pwrrt
# changelog
cp $pkgsrc/changelog $pkgroot/usr/share/doc/pwrrt
gzip -fq --best $pkgroot/usr/share/doc/pwrrt/changelog
# changelog.Debian
cp $pkgsrc/changelog.Debian $pkgroot/usr/share/doc/pwrrt
gzip -fq --best $pkgroot/usr/share/doc/pwrrt/changelog.Debian
# Startup files
cp $pkgsrc/pwrp_profile $pkgroot/etc
chmod a+x $pkgroot/etc/pwrp_profile
cp $pkgsrc/pwr $pkgroot/etc/init.d
chmod a+x $pkgroot/etc/init.d/pwr
# Man pages
mkdir -p $pkgroot/usr/share/man/man1
cp $pkgsrc/pwr.1 $pkgroot/usr/share/man/man1/pwr.1
gzip -fq --best $pkgroot/usr/share/man/man1/pwr.1
# Copy proview
mkdir $pkgroot/usr/pwrrt
currentdir="`eval pwd`"
tarfile=$pwre_broot/$pwre_target/bld/pkg/pwrtmp.tar
cd $pwre_broot/$pwre_target/exp
echo "-- Copy release to package tree"
tar -cf $tarfile *
cd $pkgroot/usr/pwrrt
tar -xf $tarfile
rm $tarfile
rm -r $pkgroot/usr/pwrrt/lib/*.a
rm -r $pkgroot/usr/pwrrt/exe/wb*
cp $pwr_exe/wb_distr_keepboot.sh $pkgroot/usr/pwrrt/exe
cd $currentdir
# Copy configuration files to cnf
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
# 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
# Create package
echo "-- Building package"
if which fakeroot > /dev/null; then
fakeroot dpkg -b $pkgroot $pwre_broot/$pwre_target/bld/pkg
else
dpkg -b $pkgroot $pwre_broot/$pwre_target/bld/pkg
fi
rm -r $pkgroot
Proview V3.4b (3.4.1-1)
\ No newline at end of file
Proview. See also normal changelog file.
\ No newline at end of file
Package: pwrrt
Version: 4.0.1-0
Section: base
Priority: optional
Architecture: i386
Depends: libc6 (>= 2.2.4-4)
Replaces: pwr34,pwr39,pwr40
Maintainer: Proview <postmaster@proview.se>
Description: Proview runtime environment package, beta release
Proview runtime environment, beta release
Proview
Copyright: SSAB Oxelsund AB <ssabox.com>
2003-11-21
The home page of Proview is at:
http://www.proview.se
#!/bin/sh
set -e
# Automatically added by dh_installdocs
if [ "$1" = "configure" ]; then
if [ -d /usr/doc -a ! -e /usr/doc/pwrtest -a -d /usr/share/doc/pwrtest ]; then
ln -sf ../share/doc/pwrtest /usr/doc/pwrtest
fi
fi
# End automatically added section
proot="/pwrp"
aroot="/pwrp/adm"
# Create users...
new_user=0
if ! grep -q "\bpwrp:" /etc/group; then
echo "-- Add group pwrp"
groupadd pwrp
fi
if ! grep -q "\bb55:" /etc/group; then
echo "-- Add group b55"
groupadd b55
fi
if ! grep -q "\bskiftel:" /etc/group; then
echo "-- Add group skiftel"
groupadd skiftel
fi
if ! grep -q "\bpwrp:" /etc/passwd; then
echo "-- Add user pwrp"
new_user=1
useradd -s /bin/bash -p aaupl/kQs1p3U -g pwrp -G b55,skiftel -d /home/pwrp pwrp
if [ ! -e /home/pwrp ]; then
mkdir /home/pwrp
cp /usr/pwrrt/cnf/user/.bashrc /home/pwrp
cp /usr/pwrrt/cnf/user/.bash_profile /home/pwrp
cp /usr/pwrrt/cnf/user/.mwmrc /home/pwrp
cp /usr/pwrrt/cnf/user/.rtt_start /home/pwrp
cp /usr/pwrrt/cnf/user/.xtt_start /home/pwrp
cp /usr/pwrrt/cnf/user/.xsession /home/pwrp
chown -R pwrp /home/pwrp
chgrp -R pwrp /home/pwrp
fi
fi
if ! grep -q "\bskiftel:" /etc/passwd; then
echo "-- Add user skiftel"
new_user=1
useradd -s /bin/bash -p aa6NzxS/aBgP6 -g skiftel -G pwrp -d /home/skiftel skiftel
if [ ! -e /home/pwrp ]; 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/.rtt_start /home/skiftel
cp /usr/pwrrt/cnf/user/.xtt_start /home/skiftel
cp /usr/pwrrt/cnf/user/.xsession /home/skiftel
chown -R pwrp /home/skiftel
chgrp -R pwrp /home/skiftel
fi
fi
if ! grep -q "\bb55:" /etc/passwd; then
echo "-- Add user b55"
new_user=1
useradd -s /bin/bash -p aaQPClsglxJP6 -g b55 -G pwrp -d /home/b55 b55
if [ ! -e /home/b55 ]; 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/.rtt_start /home/b55
cp /usr/pwrrt/cnf/op/.xtt_start /home/b55
cp /usr/pwrrt/cnf/op/.xsession /home/b55
chown -R b55 /home/b55
chgrp -R pwrp /home/b55
fi
fi
chown -R pwrp /usr/pwrrt
chgrp -R pwrp /usr/pwrrt
chmod u+s /usr/pwrrt/exe/rt_ini
chmod u+s /usr/pwrrt/exe/rt_rtt
chmod u+s /usr/pwrrt/exe/rt_xtt
chmod u+s /usr/pwrrt/exe/rt_bck
# Copy configuration files
new_cnf=0
if [ ! -e /etc/proview.cnf ]; then
cp /usr/pwrrt/cnf/proview.cnf /etc
new_cnf=1
fi
# Add pwrp_profile to profile
if ! grep -q "/etc/pwrp_profile\b" /etc/profile; then
cat >> /etc/profile <<-EOF
if [ -e /etc/pwrp_profile ]; then
source /etc/pwrp_profile
fi
EOF
fi
# Create startup link
if [ -e /etc/rc2.d/S90pwr ]; then
rm /etc/rc2.d/S90pwr
fi
ln -s /etc/init.d/pwr /etc/rc2.d/S90pwr
# Create project
new_project=0
if [ ! -e $proot ]; then
new_project=1
mkdir $proot
mkdir $proot/common
mkdir $proot/common/inc
mkdir $proot/common/load
mkdir $proot/common/log
mkdir $proot/common/db
mkdir $proot/common/web
mkdir $proot/x86_linux
mkdir $proot/x86_linux/exe
mkdir $proot/x86_linux/lib
mkdir $proot/x86_linux/obj
mkdir $proot/x86_linux/lis
chown -R pwrp $proot
chgrp -R pwrp $proot
fi
if [ ! -e $aroot/db ]; then
mkdir -p $aroot/db
chown -R pwrp $aroot
fi
# Copy jar-files to web directory
if [ -e /etc/proview.cnf ]; then
web_dir=`eval cat /etc/proview.cnf | grep "\\bwebDirectory\\b" | awk '{print $2}'`
if [ -e "$web_dir" ]; then
cp /usr/pwrrt/lib/pwr_rt_client.jar $web_dir
cp /usr/pwrrt/lib/pwr_jop.jar $web_dir
fi
fi
changes=0
if [ $new_user -eq 1 ]; then
changes=1
elif [ $new_cnf -eq 1 ]; then
changes=1
elif [ $new_project -eq 1 ]; then
changes=1
fi
if [ $changes -ne 0 ]; then
echo ""
echo ""
echo "***********************************************************"
echo " Don't forget to do this :"
echo ""
fi
if [ $new_cnf -eq 1 ]; then
echo "-- Enter QcomBusId in /etc/proview.cnf"
fi
if [ $new_user -eq 1 ]; then
echo "-- Enter OpPlace object as argument to rt_xtt in /home/b55/.xtt_start"
fi
if [ $new_project -eq 1 ]; then
echo "-- Create file /home/pwrp/.rhost"
echo "-- Copy loadfiles and applications to project"
fi
if [ $changes -ne 0 ]; then
echo ""
echo "***********************************************************"
echo ""
fi
#!/bin/sh
set -e
# Automatically added by dh_installdocs
if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/pwrtest ]; then
rm -f /usr/doc/pwrtest
fi
# End automatically added section
proot="/pwrp"
aroot="/pwrp/adm"
echo ""
echo -n "Do you wan't to remove project and users (y/n) [n] "
read remove_all
if [ "$remove_all" = "y" ]; then
echo "-- Remove user b55"
if grep -q "\bb55:" /etc/passwd; then
userdel b55
fi
if [ -e /home/b55 ]; then
rm -r /home/b55
fi
echo "-- Remove user pwrp"
if grep -q "\bpwrp:" /etc/passwd; then
userdel pwrp
fi
if [ -e /home/pwrp ]; then
rm -r /home/pwrp
fi
if grep -q "\bpwrp:" /etc/group; then
groupdel pwrp
fi
echo "-- Remove project $proot"
if [ -e $proot ]; then
rm -r $proot
fi
if [ -e $aroot ]; then
rm -r $aroot
fi
fi
# Remove startup
if [ -e /etc/rc2.d/S90pwr ]; then
rm /etc/rc2.d/S90pwr
fi
# Remove jar-files on web directory
if [ -e /etc/proview.cnf ]; then
web_dir=`eval cat /etc/proview.cnf | grep "\\bwebDirectory\\b" | awk '{print $2}'`
if [ -e $web_dir/pwr_rt_client.jar ]; then
rm $web_dir/pwr_rt_client.jar
fi
if [ -e $web_dir/pwr_jop.jar ]; then
rm $web_dir/pwr_jop.jar
fi
fi
#
# Configuration file for Proview
#
# Default QCOM Bus Id
#
qcomBusId 517
#
# Web directory
#
webDirectory /var/www
#!/bin/bash
#
# Startscript fr PWR av Ulf Ljungdahl
#
#test -x /sbin/ipchains || exit 0
#test -x /sbin/ipchains-restore || exit 0
#test -x /sbin/ipchains-save || exit 0
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
. /etc/pwrp_profile
save ()
{
echo -n "Saving IP chains: "
TEMPFILE="`tempfile`"
echo "${SAVEFILEHEADER}" >"${TEMPFILE}" && /sbin/ipchains-save >>"${TEMPFILE}" 2>/dev/null
cat "${TEMPFILE}" >/etc/ipchains.save
rm "${TEMPFILE}"
}
pwr_start()
{
$pwr_exe/rt_ini &
sleep 5
/usr/sbin/setrtprio `ps ax | grep "plc" | grep -v "grep" | awk '{ print $1}'`
}
pwr_stop()
{
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
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
}'`
if [ -e $pwrp_exe/pwrp_stop.sh ]; then
source $pwrp_exe/pwrp_stop.sh
fi
rm /tmp/pwr*$PWR_BUS_ID
#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
}
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
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)
echo "Startar om PWR."
echo "Stoppar det frst."
pwr_stop
sleep 1
echo "Startar igen."
pwr_start
echo "Klar."
;;
*)
echo "Usage:{start|stop|restart}" >&2
#echo "Ingen parameter angiven, startar PWR"
#$0 start
exit 1
;;
esac
exit 0
PWR(1) Proview Manuals PWR(1)
NAME
pwr - start and stop Proview runtime environment
SYNOPSIS
pwr [start][stop]
DESCRIPTION
Start and stop command for Proview runtime environment.
OPTIONS
start Start Proview runtime environment.
stop Stop Proview runtime environment.
FILES
/etc/pwrp_profile
The system wide configuration file..
AUTHOR
Written by CS.
SEE ALSO
pwr(5)
Proview Last change: Nov 2003
bus_id=""
if [ -e /etc/proview.cnf ]; then
bus_id=`eval cat /etc/proview.cnf | grep "\\bqcomBusId\\b" | awk '{print $2}'`
fi
if [ -e /etc/proview.cnf ]; then
web_dir=`eval cat /etc/proview.cnf | grep "\\bwebDirectory\\b" | awk '{print $2}'`
fi
export PWR_BUS_ID=$bus_id
export pwrb_root=/usr/pwrrt
export pwrp_root=/pwrp
export pwr_exe=$pwrb_root/exe
export pwr_lib=$pwrb_root/lib
export pwr_obj=$pwrb_root/obj
export pwr_inc=$pwrb_root/inc
export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwrp_exe=$pwrp_root/x86_linux/exe
export pwrp_lib=$pwrp_root/x86_linux/lib
export pwrp_obj=$pwrp_root/x86_linux/obj
export pwrp_lis=$pwrp_root/x86_linux/lis
export pwrp_inc=$pwrp_root/common/inc
export pwrp_load=$pwrp_root/common/load
export pwrp_log=$pwrp_root/common/log
export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db=/pwrp/adm/db
export jdk_home=/usr/local/jdk1.3/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#Set display to remote computer
export DISPLAY=$REMOTEHOST:0.0
#symbols to define start/stop commands for PWR
alias pwr_stop='/etc/init.d/pwr stop'
alias pwr_stop.sh="/etc/init.d/pwr stop"
alias pwr_start="/etc/init.d/pwr start"
alias pwr="/etc/init.d/pwr"
alias boot="/usr/bin/sudo /sbin/reboot"
include $(pwre_dir_symbols)
ifndef variables_mk
-include $(pwre_sroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef variables_mk
include $(pwre_sroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef rules_mk
-include $(pwre_sroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef rules_mk
include $(pwre_sroot)/tools/bld/src/$(os_name)/rules.mk
endif
.SUFFIXES:
.PHONY : all init copy lib exe clean realclean \
$(clean_ge)
all : init copy lib exe
init : dirs
copy :
lib :
exe : $(bld_dir)/control_pwrrt $(bld_dir)/control_pwr
clean :
realclean :
dirs : $(bld_dir)$(dir_ext)
$(bld_dir)$(dir_ext) :
@ $(mkdir) -p $(mkdirflags) $(basename $@)
$(bld_dir)/control_pwrrt : ../../../pwrrt/control
@ echo "build $(target)"
@ ../../../pwrrt/build.sh
@ cp $(source) $(target)
$(bld_dir)/control_pwr : ../../../pwr/control
@ echo "build $(target)"
@ ../../../pwr/build.sh
@ cp $(source) $(target)
#!/bin/bash
#
# Startscript fr PWR av Ulf Ljungdahl
#
#test -x /sbin/ipchains || exit 0
#test -x /sbin/ipchains-restore || exit 0
#test -x /sbin/ipchains-save || exit 0
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
. /etc/pwrp_profile
save ()
{
echo -n "Saving IP chains: "
TEMPFILE="`tempfile`"
echo "${SAVEFILEHEADER}" >"${TEMPFILE}" && /sbin/ipchains-save >>"${TEMPFILE}" 2>/dev/null
cat "${TEMPFILE}" >/etc/ipchains.save
rm "${TEMPFILE}"
}
pwr_start()
{
$pwr_exe/rt_ini &
sleep 5
/usr/sbin/setrtprio `ps ax | grep "plc" | grep -v "grep" | awk '{ print $1}'`
}
pwr_stop()
{
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
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
}'`
if [ -e $pwrp_exe/pwrp_stop.sh ]; then
source $pwrp_exe/pwrp_stop.sh
fi
rm /tmp/pwr*$PWR_BUS_ID
#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
}
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
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)
echo "Startar om PWR."
echo "Stoppar det frst."
pwr_stop
sleep 1
echo "Startar igen."
pwr_start
echo "Klar."
;;
*)
echo "Usage:{start|stop|restart}" >&2
#echo "Ingen parameter angiven, startar PWR"
#$0 start
exit 1
;;
esac
exit 0
# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
umask 022
# the rest of this file is commented out.
# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# set PATH so it includes user's private bin if it exists
#if [ -d ~/bin ] ; then
# PATH=~/bin:"${PATH}"
#fi
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files for examples
source /etc/pwrp_profile
# If running interactively, then:
if [ "$PS1" ]; then
# enable color support of ls and also add handy aliases
eval `dircolors -b`
alias ls='ls --color=auto'
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
# set a fancy prompt
PS1='\u@\h:\w\$ '
# If this is an xterm set the title to user@host:dir
#case $TERM in
#xterm*)
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
# ;;
#*)
# ;;
#esac
fi
!!
!! Root Menu Description
!!
Menu DefaultRootMenu
{
"Root Menu" f.title
"XTT OP-bilder" f.exec "~/.xtt_start &"
! "XTT" f.exec "~/.xtt_start"
! "RTT" f.exec "/usr/bin/X11/xterm -T RTT -e ~/.rtt_start &"
"Xterm" f.exec "/usr/bin/X11/xterm -T XTerm -sb -right &"
"Klocka" f.exec "/usr/bin/X11/xclock &"
"Miniraknare" f.exec "/usr/bin/X11/xcalc &"
! "Shuffle Up" f.circle_up
! "Shuffle Down" f.circle_down
"Refresh" f.refresh
! "Pack Icons" f.pack_icons
! "Toggle Behavior..." f.set_behavior
no-label f.separator
! "Starta om X" f.restart
"Logga ut" f.quit_mwm
"Starta om dator" f.exec "/usr/bin/rebootreq &"
"Stang av dator" f.exec "/usr/bin/haltreq &"
}
!!
!! Default Window Menu
!!
Menu DefaultWindowMenu
{
"Make Pinned" f.toggle_pin_state
no-label f.separator
Restore _R Alt<Key>F5 f.restore
Move _M Alt<Key>F7 f.move
Size _S Alt<Key>F8 f.resize
Minimize _n Alt<Key>F9 f.minimize
Maximize _x Alt<Key>F10 f.maximize
Raise _a Alt<Key>F2 f.raise
Lower _L Alt<Key>F3 f.lower
no-label f.separator
Close _C Alt<Key>F4 f.kill
}
!!
!! Default Key Bindings
!!
Keys DefaultKeyBindings
{
Shift<Key>Escape window|icon f.post_wmenu
Alt<Key>space window|icon f.post_wmenu
Alt<Key>Tab root|icon|window f.next_key
Alt Shift<Key>Tab root|icon|window f.prev_key
Alt<Key>Escape root|icon|window f.circle_down
Alt Shift<Key>Escape root|icon|window f.circle_up
Alt Shift Ctrl<Key>exclam root|icon|window f.set_behavior
Alt<Key>F6 window f.next_key transient
Alt Shift<Key>F6 window f.prev_key transient
Shift<Key>F10 icon f.post_wmenu
Alt Shift<Key>Delete root|icon|window f.restart
}
!!
!! Button Binding Description(s)
!!
!! These can be used anywhere
!!
Buttons DefaultButtonBindings
{
<Btn1Down> icon|frame f.raise
<Btn3Down> icon|frame f.post_wmenu
<Btn3Down> root f.menu DefaultRootMenu
}
!!
!! These are some example bindings that you might use if your
!! keyboardFocusPolicy is "explicit". Note that to use these, you'll
!! have to change the Mwm*buttonBindings resource in Mwm to
!! ExplicitButtonBindings instead of DefaultButtonBindings.
!!
Buttons ExplicitButtonBindings
{
<Btn1Down> frame|icon f.raise
<Btn3Down> frame|icon f.post_wmenu
<Btn3Down> root f.menu DefaultRootMenu
! <Btn1Up> icon f.restore
Alt<Btn1Down> window|icon f.lower
! Alt<Btn2Down> window|icon f.resize
! Alt<Btn3Down> window|icon f.move
}
!! These are some example bindings that you might use if your
!! keyboardFocusPolicy is "pointer". Note that to use these, you'll
!! have to change the Mwm*buttonBindings resource in Mwm to
!! PointerButtonBindings instead of DefaultButtonBindings.
!!
Buttons PointerButtonBindings
{
<Btn1Down> frame|icon f.raise
<Btn3Down> frame|icon f.post_wmenu
<Btn3Down> root f.menu DefaultRootMenu
<Btn1Down> window f.raise
! <Btn1Up> icon f.restore
Alt<Btn1Down> window|icon f.lower
! Alt<Btn2Down> window|icon f.resize
! Alt<Btn3Down> window|icon f.move
}
!include-menu-defs
#Automatically generated file. Do not edit (see /usr/doc/menu/html/index.html)
Menu "/Debian/Apps/Editors"
{
"Editors" f.title
"Emacs 20" f.exec "/usr/bin/emacs20 &"
"NEdit" f.exec "/usr/bin/X11/nedit &"
"Xedit" f.exec "xedit &"
}
Menu "/Debian/Apps/Graphics"
{
"Graphics" f.title
"Bitmap" f.exec "bitmap &"
}
Menu "/Debian/Apps/Math"
{
"Math" f.title
"Xcalc" f.exec "xcalc &"
"bc" f.exec "x-terminal-emulator -T 'bc' -e /usr/bin/bc &"
"dc" f.exec "x-terminal-emulator -T 'dc' -e /usr/bin/dc &"
}
Menu "/Debian/Apps/Net"
{
"Net" f.title
"Lynx" f.exec "x-terminal-emulator -T 'Lynx' -e /usr/bin/lynx &"
"Telnet" f.exec "x-terminal-emulator -T 'Telnet' -e telnet &"
"Xbiff" f.exec "xbiff &"
}
Menu "/Debian/Apps/Programming"
{
"Programming" f.title
"Gdb" f.exec "x-terminal-emulator -T 'Gdb' -e /usr/bin/gdb &"
"Python (v2.1)" f.exec "x-terminal-emulator -T 'Python (v2.1)' -e /usr/bin/python2.1 &"
"Tclsh8.0" f.exec "x-terminal-emulator -T 'Tclsh8.0' -e /usr/bin/tclsh8.0 &"
"Tclsh8.2" f.exec "x-terminal-emulator -T 'Tclsh8.2' -e /usr/bin/tclsh8.2 &"
"Tclsh8.3" f.exec "x-terminal-emulator -T 'Tclsh8.3' -e /usr/bin/tclsh8.3 &"
"TkWish8.0" f.exec "x-terminal-emulator -T 'TkWish8.0' -e /usr/bin/wish8.0 &"
"TkWish8.3" f.exec "/usr/bin/wish8.3 &"
}
Menu "/Debian/Apps/Shells"
{
"Shells" f.title
"Bash" f.exec "x-terminal-emulator -T 'Bash' -e /bin/bash -login &"
"Sh" f.exec "x-terminal-emulator -T 'Sh' -e /bin/sh -login &"
"Tcsh" f.exec "x-terminal-emulator -T 'Tcsh' -e /usr/bin/tcsh &"
}
Menu "/Debian/Apps/System/Admin"
{
"Admin" f.title
"Lilo-config" f.exec "x-terminal-emulator -T 'Lilo-config' -e /usr/sbin/su-to-root -p root -c /usr/sbin/liloconfig &"
"gpm-config" f.exec "x-terminal-emulator -T 'gpm-config' -e /usr/sbin/su-to-root -p root -c /usr/sbin/gpmconfig &"
}
Menu "/Debian/Apps/System"
{
"System" f.title
"Admin" f.menu "/Debian/Apps/System/Admin"
"Task selector" f.exec "x-terminal-emulator -T 'Task selector' -e su-to-root /usr/bin/tasksel &"
"Top" f.exec "x-terminal-emulator -T 'Top' -e /usr/bin/top &"
"Xconsole" f.exec "xconsole &"
"Xload" f.exec "xload &"
"Xvidtune" f.exec "xvidtune &"
"pstree" f.exec "/etc/alternatives/x-terminal-emulator -e /usr/bin/pstree.x11 &"
}
Menu "/Debian/Apps/Tools"
{
"Tools" f.title
"Editres" f.exec "editres &"
"Oclock" f.exec "oclock &"
"X Window Snapshot" f.exec "xwd | xwud &"
"Xclipboard" f.exec "xclipboard &"
"Xclock (analog)" f.exec "xclock -analog &"
"Xclock (digital)" f.exec "xclock -digital -update 1 &"
"Xcutsel" f.exec "xcutsel &"
"Xev" f.exec "x-terminal-emulator -e xev &"
"Xfontsel" f.exec "xfontsel &"
"Xkill" f.exec "xkill &"
"Xmag" f.exec "xmag &"
"Xrefresh" f.exec "xrefresh &"
}
Menu "/Debian/Apps/Viewers"
{
"Viewers" f.title
"GV" f.exec "/usr/bin/X11/gv &"
"XDvi" f.exec "/usr/bin/xdvi &"
"Xditview" f.exec "xditview &"
}
Menu "/Debian/Apps"
{
"Apps" f.title
"Editors" f.menu "/Debian/Apps/Editors"
"Graphics" f.menu "/Debian/Apps/Graphics"
"Math" f.menu "/Debian/Apps/Math"
"Net" f.menu "/Debian/Apps/Net"
"Programming" f.menu "/Debian/Apps/Programming"
"Shells" f.menu "/Debian/Apps/Shells"
"System" f.menu "/Debian/Apps/System"
"Tools" f.menu "/Debian/Apps/Tools"
"Viewers" f.menu "/Debian/Apps/Viewers"
}
Menu "/Debian/Games/Toys"
{
"Toys" f.title
"Xeyes" f.exec "xeyes &"
"Xlogo" f.exec "xlogo &"
}
Menu "/Debian/Games"
{
"Games" f.title
"Toys" f.menu "/Debian/Games/Toys"
}
Menu "/Debian/Help"
{
"Help" f.title
"Info" f.exec "x-terminal-emulator -T 'Info' -e info &"
"Xman" f.exec "xman &"
}
Menu "/Debian/Screen/Root-window"
{
"Root-window" f.title
"Xsetroot" f.exec "xsetroot &"
}
Menu "/Debian/Screen/Save"
{
"Save" f.title
"Beforelight" f.exec "beforelight &"
}
Menu "/Debian/Screen"
{
"Screen" f.title
"Root-window" f.menu "/Debian/Screen/Root-window"
"Save" f.menu "/Debian/Screen/Save"
}
Menu "/Debian/XShells"
{
"XShells" f.title
"XTerm" f.exec "xterm &"
"XTerm (Unicode)" f.exec "uxterm &"
}
Menu "/Debian"
{
"Debian" f.title
"Apps" f.menu "/Debian/Apps"
"Games" f.menu "/Debian/Games"
"Help" f.menu "/Debian/Help"
"Screen" f.menu "/Debian/Screen"
"XShells" f.menu "/Debian/XShells"
}
#!/bin/sh
ource /etc/pwrp_profile
$pwr_exe/rt_rtt
xsetroot -solid darkcyan
xhost +localhost
~/.xtt_start
xset s off s noblank s noexpose -dpms
exec mwm
#!/bin/sh
source /etc/pwrp_profile
$pwr_exe/rt_xtt &
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