Commit 1a08fc31 authored by claes's avatar claes

adm moved do /usr/pwrp, pwrdemo package added and other changes

parent f9245e50
......@@ -6,3 +6,4 @@ pwrp()
alias sdf="source $pwra_db/pwra_env.sh set project"
alias pwrc="wb_cmd"
alias pwrs="wb_start.sh pwrp pwrp"
alias pwra="wb -p pwrp pwrp"
1
100 V1.0.0
2
200 Common
201 0
202 1
3
300 op1
301 ;:y
302 4261289343
99
3
300 op2
301 ;:x
302 4261289279
99
3
300 op3
301 ;:w
302 4261289151
99
3
300 op4
301 ;:v
302 4261288895
99
3
300 System
301 7176E=
302 4294843835
99
3
300 Maintenance
301 =IA<6E<I<GE
302 4294843831
99
3
300 pwrp
301 :38:
302 4280163775
99
99
99
!
! pwr_volumelist.dat
!
! Description: This file contains all volumes, with identity,
! name and project.
!
!
! Baseclasses 0.0.1.1-254
!
! Volumename Identity Project
! ---------- -------- -------
!**Menu ClassVolumes { //
!**Menu BaseClasses { //
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/sh
source /etc/pwrp_profile
$pwr_exe/rt_xtt -u $USER &
$pwr_exe/rt_xtt -u $USER -a &
#!/bin/bash
aroot="/usr/pwrp/adm"
# 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}'`
......@@ -144,15 +146,19 @@ 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
cp $pwre_sroot/tools/pkg/deb/adm/pwr_user.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
echo "source $aroot/db/pwr_setup.sh" >> $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user/.bashrc
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
cp $pwre_sroot/tools/pkg/deb/user/wtt_init.pwr_com $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/wtt_init1.pwr_com $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
# Create package
echo "-- Building package"
......
Package: pwr41
Version: 4.1.0-1
Version: 4.1.1-1
Section: base
Priority: optional
Architecture: i386
......@@ -8,4 +8,4 @@ Replaces: pwrrt,pwr34,pwr39,pwr40
Maintainer: Proview <postmaster@proview.se>
Description: Proview development and runtime environment package
Proview development and runtime environment
4.1.0-1 Base release
4.1.1-1 Base release
......@@ -13,7 +13,7 @@ if [ "$1" = "configure" ]; then
fi
# End automatically added section
aroot="/pwrp/adm"
aroot="/usr/pwrp/adm"
# Create group pwrp
if ! grep -q "\bpwrp:" /etc/group; then
......@@ -31,8 +31,12 @@ if ! grep -q "\bpwrp:" /etc/passwd; then
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
chmod a+x /home/pwrp/.rtt_start
cp /usr/pwr$ver/$pwre_target/exp/cnf/user/.xtt_start /home/pwrp
chmod a+x /home/pwrp/.xtt_start
cp /usr/pwr$ver/$pwre_target/exp/cnf/user/.xsession /home/pwrp
cp /usr/pwr$ver/$pwre_target/exp/cnf/user/wtt_init.pwr_com /home/pwrp
cp /usr/pwr$ver/$pwre_target/exp/cnf/user/wtt_init1.pwr_com /home/pwrp
chown -R pwrp /home/pwrp
chgrp -R pwrp /home/pwrp
......@@ -65,6 +69,7 @@ if ! grep -q "/etc/pwrp_profile\b" /etc/profile; then
EOF
fi
# Create and copy adm
if [ ! -e $aroot/db ]; then
mkdir -p $aroot/db
fi
......@@ -74,21 +79,37 @@ 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_user.dat ]; then
cp /usr/pwr$ver/$pwre_target/exp/cnf/pwr_user.dat $aroot/db
fi
# Insert base in projectlist
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
else
set +e
ptst=`eval grep "^%base" $aroot/db/pwr_projectlist.dat | grep "\bV${ver:0:1}.${ver:1:1}\b"`
set -e
if [ "$ptst" = "" ]; then
echo "%base V${ver:0:1}.${ver:1:1} /usr/pwr$ver" >> $aroot/db/pwr_projectlist.dat
fi
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
# Change group to pwrp
chgrp pwrp $aroot
chmod g+w $aroot
chgrp -R pwrp $aroot/*
chmod -R g+w $aroot/*
chmod a+w /usr/pwr$ver/$pwre_target/exp/load/*.dbs
# Create project root
if [ ! -e /usr/local/pwrp ]; then
mkdir /usr/local/pwrp
chgrp pwrp /usr/local/pwrp
chmod g+w /usr/local/pwrp
fi
......
......@@ -29,7 +29,7 @@ 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 pwra_db=/usr/pwrp/adm/db
export jdk_home=/usr/local/jdk1.3/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
......
#!/bin/bash
aroot="/usr/pwrp/adm"
# 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
proot=/data0/pwrp/pwrdemo$ver
pkgroot=$pwre_broot/$pwre_target/bld/pkg/pwrdemo$ver
pkgsrc=$pwre_sroot/tools/pkg/deb/pwrdemo
echo "-- Building pwrdemo$ver"
# Create directories
mkdir -p $pkgroot/DEBIAN
mkdir -p $pkgroot/usr/share/doc/pwrdemo$ver
mkdir -p $pkgroot/usr/pwrp
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
echo "#!/bin/sh" > $pkgroot/DEBIAN/prerm
echo "ver=\"$ver\"" >> $pkgroot/DEBIAN/prerm
cat $pkgsrc/prerm >> $pkgroot/DEBIAN/prerm
chmod a+x $pkgroot/DEBIAN/prerm
# copyright
cp $pkgsrc/copyright $pkgroot/usr/share/doc/pwrdemo$ver
# changelog
cp $pkgsrc/changelog $pkgroot/usr/share/doc/pwrdemo$ver
gzip -fq --best $pkgroot/usr/share/doc/pwrdemo$ver/changelog
# changelog.Debian
cp $pkgsrc/changelog.Debian $pkgroot/usr/share/doc/pwrdemo$ver
gzip -fq --best $pkgroot/usr/share/doc/pwrdemo$ver/changelog.Debian
# Man pages
# Copy pwrdemo
mkdir $pkgroot/usr/pwrp/pwrdemo$ver
currentdir="`eval pwd`"
tarfile=$pwre_broot/$pwre_target/bld/pkg/pwrtmp.tar
cd $proot
cd ..
echo "-- copy project to package tree"
tar -cf $tarfile pwrdemo$ver
cd $pkgroot/usr/pwrp
tar -xf $tarfile
rm $tarfile
cd $currentdir
# 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: pwrdemo41
Version: 4.1.1-1
Section: base
Priority: optional
Architecture: i386
Depends: pwr41 (>= 4.1.1-1)
Replaces:
Maintainer: Proview <postmaster@proview.se>
Description: Proview Demo Project package
Proview Demo Project
4.1.1-1 Base release
Proview
Copyright: SSAB Oxelsund AB <ssabox.com>
2003-11-21
The home page of Proview is at:
http://www.proview.se
set -e
# Added by build.sh :
# 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="/usr/pwrp/adm"
echo "Change owner of files to pwrp"
chown -R pwrp /usr/pwrp/pwrdemo$ver
# Register volume
if [ -e $aroot/db/pwr_volumelist.dat ]; then
set +e
ptst=`eval grep "'\bVolPwrDemo\b'" $aroot/db/pwr_volumelist.dat | grep "\bpwrdemo\b"`
set -e
if [ "$ptst" = "" ]; then
echo " VolPwrDemo 0.254.254.200 pwrdemo" >> $aroot/db/pwr_volumelist.dat
fi
fi
# Insert base in projectlist
if [ -e $aroot/db/pwr_projectlist.dat ]; then
set +e
ptst=`eval grep "'\bpwrdemo$ver\b'" $aroot/db/pwr_projectlist.dat`
set -e
if [ "$ptst" = "" ]; then
echo "pwrdemo$ver V${ver:0:1}.${ver:1:1} /usr/pwrp/pwrdemo$ver \"\" " >> $aroot/db/pwr_projectlist.dat
fi
fi
# Insert nodename in DirectoryVolume and create bootfile
nodename=`eval uname -n`
initsh=/tmp/pwrdemo_init.sh
initpwrc=/tmp/pwrdemo_init.pwr_com
# Create a shellscript that attaches to projects and runs wb_cmd
cat > $initsh <<EOF
#!/bin/bash
source $aroot/db/pwr_setup.sh
source \$pwr_exe/pwrp_env.sh set project pwrdemo$ver
wb_cmd @$initpwrc
EOF
chmod a+x $initsh
# Create a wb_cmd script that inserts nodename and creates bootfile
cat > $initpwrc <<EOF
set attr/name=Bus999-DemoNode/attr=NodeName/value="$nodename"/noconf
save
create boot/node=DemoNode
exit
EOF
# Execute shellscript
sudo -u pwrp $initsh
rm $initsh
rm $initpwrc
#
# ver='version' is added by build.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
if [ -e /usr/pwrp/pwrdemo$ver ]; then
rm -r /usr/pwrp/pwrdemo$ver
fi
Package: pwrrt
Version: 4.1.0-0
Version: 4.1.1-1
Section: base
Priority: optional
Architecture: i386
......@@ -7,12 +7,9 @@ Depends: libc6 (>= 2.2.4-4)
Replaces: pwr34,pwr39,pwr40,pwr41
Maintainer: Proview <postmaster@proview.se>
Description:
Proview runtime environment, base release
Proview runtime environment, base release
Changes in 4.1.1-1
Claes test package.
#!/bin/sh
set -e
if [ "$pwrrt_xtrace" != "" ]; then
set -o xtrace
fi
# Automatically added by dh_installdocs
if [ "$1" = "configure" ]; then
......@@ -10,7 +13,7 @@ fi
# End automatically added section
proot="/pwrp"
aroot="/pwrp/adm"
aroot="/usr/pwrp/adm"
# Create users...
new_user=0
......@@ -37,7 +40,9 @@ if ! grep -q "\bpwrp:" /etc/passwd; then
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
chmod a+x /home/pwrp/.rtt_start
cp /usr/pwrrt/cnf/user/.xtt_start /home/pwrp
chmod a+x /home/pwrp/.xtt_start
cp /usr/pwrrt/cnf/user/.xsession /home/pwrp
chown -R pwrp /home/pwrp
......@@ -55,7 +60,9 @@ if ! grep -q "\bskiftel:" /etc/passwd; then
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
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
chown -R pwrp /home/skiftel
......@@ -73,7 +80,9 @@ if ! grep -q "\bb55:" /etc/passwd; then
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
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
chown -R b55 /home/b55
......@@ -113,15 +122,22 @@ EOF
fi
# Create startup link
if [ -e /etc/rc2.d/S90pwr ]; then
set +e
checklink=`eval ls /etc/rc2.d/S90pwr 2>/dev/null`
set -e
if [ "$checklink" != "" ]; then
rm /etc/rc2.d/S90pwr
fi
ln -s /etc/init.d/pwr /etc/rc2.d/S90pwr
if [ -e /etc/rc2.d/S91gdhserver ]; then
set +e
checklink=`eval ls /etc/rc2.d/S91gdhserver 2>/dev/null`
set -e
if [ "$checklink" != "" ]; then
rm /etc/rc2.d/S91gdhserver
fi
ln -s /etc/init.d/gdhserver /etc/rc2.d/S91gdhserver
# Obsolete
#ln -s /etc/init.d/gdhserver /etc/rc2.d/S91gdhserver
# Create project
new_project=0
......@@ -152,7 +168,9 @@ fi
# Copy jar-files to web directory
if [ -e /etc/proview.cnf ]; then
set +e
web_dir=`eval cat /etc/proview.cnf | grep "\\bwebDirectory\\b" | awk '{print $2}'`
set -e
if [ -e "$web_dir" ]; then
cp /usr/pwrrt/lib/pwr_rt_client.jar $web_dir
......@@ -225,13 +243,14 @@ 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_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"
nodename=`eval uname -n`
echo "-- Create file /home/pwrp/.rhosts"
echo "-- Distribute project to $nodename"
fi
if [ $changes -ne 0 ]; then
......
......@@ -8,13 +8,42 @@ fi
# End automatically added section
proot="/pwrp"
aroot="/pwrp/adm"
aroot="/usr/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
# Check that any user that is to be remoted isn't logged in
set +e
user_found=0
currentusers=`eval users`
userstr=""
checkuser=`eval echo $currentusers | grep "\bb55\b"`
if [ "$checkuser" != "" ]; then
user_found=1
userstr=$userstr" b55"
fi
checkuser=`eval echo $currentusers | grep "\bpwrp\b"`
if [ "$checkuser" != "" ]; then
user_found=1
userstr=$userstr" pwrp"
fi
checkuser=`eval echo $currentusers | grep "\bskiftel\b"`
if [ "$checkuser" != "" ]; then
user_found=1
userstr=$userstr" skiftel"
fi
if [ $user_found -eq 1 ]; then
echo "-- Current users: $currentusers"
echo "** Remove user will fail. Logout user $userstr first."
exit -1;
fi
set -e
echo "-- Remove user b55"
if grep -q "\bb55:" /etc/passwd; then
userdel b55
......@@ -31,10 +60,26 @@ if [ "$remove_all" = "y" ]; then
rm -r /home/pwrp
fi
echo "-- Remove user skiftel"
if grep -q "\bskiftel:" /etc/passwd; then
userdel skiftel
fi
if [ -e /home/skiftel ]; then
rm -r /home/skiftel
fi
if grep -q "\bb55:" /etc/group; then
groupdel b55
fi
if grep -q "\bpwrp:" /etc/group; then
groupdel pwrp
fi
if grep -q "\bskiftel:" /etc/group; then
groupdel skiftel
fi
echo "-- Remove project $proot"
if [ -e $proot ]; then
rm -r $proot
......@@ -46,7 +91,8 @@ if [ "$remove_all" = "y" ]; then
fi
# Remove startup
if [ -e /etc/rc2.d/S90pwr ]; then
checklink=`eval ls /etc/rc2.d/S90pwr 2>/dev/null`
if [ "$checklink" != "" ]; then
rm /etc/rc2.d/S90pwr
fi
......
......@@ -29,7 +29,7 @@ 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 pwra_db=/usr/pwrp/adm/db
jdk=`eval ls /usr/local | grep j2re`
export jdk_home=/usr/local/$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
......
......@@ -29,7 +29,7 @@ copy :
lib :
exe : $(bld_dir)/control_pwrrt $(bld_dir)/control_pwr
exe : $(bld_dir)/control_pwrrt $(bld_dir)/control_pwr $(bld_dir)/control_pwrdemo
clean :
......@@ -50,5 +50,10 @@ $(bld_dir)/control_pwr : ../../../pwr/control
@ ../../../pwr/build.sh
@ cp $(source) $(target)
$(bld_dir)/control_pwrdemo : ../../../pwrdemo/control
@ echo "build $(target)"
@ ../../../pwrdemo/build.sh
@ cp $(source) $(target)
!** Description: Wtt initialization file
! This file is generated at 'Set settings'
! Dont make any changes, use the symbolfile for application setup
if ( IsW1())
set window /width=600 /height=600
two
set inputfocus w1
endif
if ( IsW1())
set noadvanceduser /local
set noalltoplevel /local
set showclass /local
set noshowalias /local
set show description/local
set noshowobjref /local
set noshowobjxref /local
set noshowattrref /local
set noshowattrxref /local
endif
if ( IsW2())
set noadvanceduser /local
set noalltoplevel /local
set showclass /local
set noshowalias /local
set show description/local
set noshowobjref /local
set noshowobjxref /local
set noshowattrref /local
set noshowattrxref /local
endif
!** Description: Wtt initialization file
! This file is generated at 'Set settings'
! Dont make any changes, use the symbolfile for application setup
if ( IsW1())
set window /width=600 /height=600
two
set inputfocus w1
endif
if ( IsW1())
set noadvanceduser /local
set noalltoplevel /local
set showclass /local
set noshowalias /local
set show description/local
set noshowobjref /local
set noshowobjxref /local
set noshowattrref /local
set noshowattrxref /local
endif
if ( IsW2())
set noadvanceduser /local
set noalltoplevel /local
set showclass /local
set noshowalias /local
set show description/local
set noshowobjref /local
set noshowobjxref /local
set noshowattrref /local
set noshowattrxref /local
endif
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