Commit 8db016c2 authored by claes's avatar claes

OpenBSD pwrrt package

parent 2e4f535d
......@@ -2679,6 +2679,8 @@ char *cdh_OpSysToStr( pwr_mOpSys opsys)
case pwr_mOpSys_X86_64_MACOS: strcpy( str, "x86_64_macos"); break;
case pwr_mOpSys_ARM_LINUX: strcpy( str, "arm_linux"); break;
case pwr_mOpSys_X86_64_FREEBSD: strcpy( str, "x86_64_freebsd"); break;
case pwr_mOpSys_X86_64_OPENBSD: strcpy( str, "x86_64_openbsd"); break;
case pwr_mOpSys_X86_CYGWIN: strcpy( str, "x86_cygwin"); break;
default: strcpy( str, "");
}
return str;
......@@ -2707,6 +2709,8 @@ char *cdh_OpSysToDirStr( pwr_mOpSys opsys)
case pwr_mOpSys_X86_64_MACOS: strcpy( str, "os_macos/hw_x86_64"); break;
case pwr_mOpSys_ARM_LINUX: strcpy( str, "os_linux/hw_arm"); break;
case pwr_mOpSys_X86_64_FREEBSD: strcpy( str, "os_freebsd/hw_x86_64"); break;
case pwr_mOpSys_X86_64_OPENBSD: strcpy( str, "os_openbsd/hw_x86_64"); break;
case pwr_mOpSys_X86_CYGWIN: strcpy( str, "os_cygwin/hw_x86"); break;
default: strcpy( str, "");
}
return str;
......
#!/bin/bash
set -o xtrace
aroot="/usr/pwrp/adm"
pkgsrc=$pwre_sroot/tools/pkg/openbsd/pwr
# Get version
if [ -e $pwr_inc/pwr_version.h ]; then
ver=`eval cat $pwr_inc/pwr_version.h | grep "[[:<:]]pwrv_cWbdbVersionShortStr[[:>:]]" | awk '{print $3}'`
......@@ -20,11 +15,11 @@ fi
# Generate version help file
{
if [ ! -e $pkgsrc/control ]; then
if [ ! -e $pwre_sroot/tools/pkg/deb/pwr/control ]; then
echo "Controlfile not found"
exit 1
fi
datfile=$pkgsrc/control
datfile=$pwre_sroot/tools/pkg/deb/pwr/control
echo "<topic> version"
d=`eval date +\"%F %X\"`
......@@ -98,77 +93,78 @@ if [ "$1" == "-v" ]; then
exit
fi
pkgroot=$pwre_broot/$pwre_target/bld/pkg/pwr$ver
pkgsrc=$pwre_sroot/tools/pkg/openbsd/pwr
packagename=pwr$ver-$version.tar.gz
echo "-- Building pwr$ver"
packagename=pwr$ver-$version
pkgroot=$pwre_broot/$pwre_target/bld/pkg/$packagename
pkg_proot=$pwre_broot/$pwre_target/bld/pkg/$packagename/share/pwr$ver
# Create directories
echo "echo pwr$ver dummy" > $pkgroot/bin/pwr$ver
chmod a+x $pkgroot/bin/pwr$ver
mkdir -p $pkgroot/share/pwr$ver
mkdir -p $pkg_proot/usr/pwrp
mkdir -p $pkg_proot/etc
mkdir -p $pkg_proot/bin
echo "Start pwr$ver with command pwra" > $pkg_proot/share/pwr$ver/README
cp $pkgsrc/postinst $pkg_proot/install.site
# Create directories
mkdir -p $pkgroot/etc/pwr$ver
mkdir -p $pkgroot/usr/share/doc/pwr$ver
mkdir -p $pkgroot/usr/pwrp
mkdir -p $pkgroot/etc
find $pkg_proot -type d | xargs chmod 755
find $pkgroot -type d | xargs chmod 755
# copyright
cp $pkgsrc/copyright $pkg_proot/usr/share/doc/pwr$ver
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
# Man pages
mkdir -p $pkg_proot/usr/share/man/man1
cp $pkgsrc/pwr.1 $pkg_proot/usr/share/man/man1/pwr.1
gzip -fq --best $pkg_proot/usr/share/man/man1/pwr.1
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 $pkg_proot/usr/pwr$ver
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 $pkg_proot/usr/pwr$ver
cd $pkgroot/usr/pwr$ver
tar -xf $tarfile
rm $tarfile
cd $currentdir
# Remove not needed libraries
rm $pkg_proot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_flow.a
rm $pkg_proot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_ge.a
rm $pkg_proot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_glow.a
rm $pkg_proot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_tlog.a
rm $pkg_proot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_wb.a
rm $pkg_proot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_xtt.a
rm $pkgroot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_flow.a
rm $pkgroot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_ge.a
rm $pkgroot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_glow.a
rm $pkgroot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_tlog.a
rm $pkgroot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_wb.a
rm $pkgroot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_xtt.a
# Copy configuration files to cnf
cp $pkgsrc/proview.cnf $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf
cp $pkgsrc/pwrp_profile $pkg_proot/etc
chmod a+x $pkg_proot/etc/pwrp_profile
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 $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf
echo "pwrp set base V${ver:0:1}.${ver:1:1}" >> $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/pwr_setup.sh
chmod a+x $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/pwr_setup.sh
cp $pwre_sroot/tools/pkg/deb/adm/pwra_env.sh $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf
chmod a+x $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/pwra_env.sh
cp $pwre_sroot/tools/pkg/deb/adm/pwr_volumelist.dat $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf
cp $pwre_sroot/tools/pkg/deb/adm/pwr_user2.dat $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf
cp $pwre_sroot/tools/pkg/deb/adm/proview_icon.png $pkg_proot/usr/pwr$ver/$pwre_target/exp/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
cp $pwre_sroot/tools/pkg/deb/adm/pwr_user2.dat $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf
cp $pwre_sroot/tools/pkg/deb/adm/proview_icon.png $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf
# Copy user to cnf
mkdir $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.bashrc $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user
echo "source $aroot/db/pwr_setup.sh" >> $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user/.bashrc
cp $pwre_sroot/tools/pkg/deb/user/.bash_profile $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user
#cp $pwre_sroot/tools/pkg/deb/user/.mwmrc $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.rtt_start $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.xtt_start $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user
#cp $pwre_sroot/tools/pkg/deb/user/.xsession $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/wtt_init.pwr_com $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/wtt_init1.pwr_com $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user
mkdir $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/openbsd/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
# Generate desktop file
{
......@@ -181,25 +177,24 @@ cp $pwre_sroot/tools/pkg/deb/user/wtt_init1.pwr_com $pkg_proot/usr/pwr$ver/$pwre
echo "Exec=xterm -title \"Proview Development Console\" -e 'export pwra_db=$aroot/db;source \$pwra_db/pwra_env.sh set base V""${version:0:3}"";source \$pwra_db/pwra_env.sh set bus;wb -p pwrp pwrp'"
echo "Icon=$aroot/db/proview_icon.png"
echo "Categories=GNOME;GTK;Application;"
} > $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user/proview$ver.desktop
} > $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user/proview$ver.desktop
# Create package
echo "-- Building package"
cd $pwre_broot/$pwre_target/bld/pkg
tar -czf /usr/ports/distfiles/$packagename.tar.gz $packagename
mkdir -p /usr/ports/mystuff/misc/pwr$ver
cd /usr/ports/mystuff/misc/pwr$ver
cp $pkgsrc/Makefile .
make makesum
mkdir pkg
echo "Proview development and runtime package" > pkg/DESCR
if [ -e /usr/obj/ports/$pkgname ]; then
rm -r /usr/obj/ports/$pkgname
fi
make fake
make plist
make package
#rm -r $pgkroot
mkdir -p $pkgroot/etc/pwr$ver
cd $pkgroot
find * -type f -exec echo "rm -f /{}" \; > $pkgroot/etc/pwr$ver/rmfiles.sh
echo "rm -r /usr/pwr$ver" >> $pkgroot/etc/pwr$ver/rmfiles.sh
# control
cp $pkgsrc/control $pkgroot/etc/pwr$ver
cp $pkgsrc/prerm $pkgroot/etc/pwr$ver
cp $pkgsrc/postinst $pkgroot/etc/pwr$ver
tar -czf ../$packagename *
rm -r $pkgroot
......
#!/bin/sh
#!/usr/local/bin/bash
set -e
# ver=""
if [ ! -e /usr/local/bin/bash ]; then
echo "** Error, bash not installed"
exit
fi
if [ ! -e /bin/bash ]; then
ln -s /usr/local/bin/bash /bin/bash
fi
# Get version from current path
dname=`eval dirname $0`
pwrdir=`eval bash -c "cd $dname; pwd"`
ver="${pwrdir:8:1}${pwrdir:9:1}"
# pwre_target=""
echo "Here in postinst..."
......@@ -28,7 +42,7 @@ if getent passwd pwrp > /dev/null; then
else
new_user=1
if useradd -s /bin/bash -p aaupl/kQs1p3U -g pwrp -d /home/pwrp pwrp; then
if useradd -m -s /bin/bash -p aaupl/kQs1p3U -g pwrp -d /home/pwrp pwrp; then
echo "-- user pwrp added"
fi
if [ ! -e /home/pwrp ]; then
......@@ -72,10 +86,10 @@ if [ ! -e /etc/proview.cnf ]; then
fi
# Add pwrp_profile to profile
if ! grep -q "/etc/pwrp_profile\b" /etc/profile; then
if ! grep -q "/etc/pwrp_profile[[:>:]]" /etc/profile; then
cat >> /etc/profile <<-EOF
if [ -e /etc/pwrp_profile ]; then
source /etc/pwrp_profile
. /etc/pwrp_profile
fi
EOF
fi
......@@ -100,7 +114,7 @@ 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
else
set +e
ptst=`eval grep "^%base" $aroot/db/pwr_projectlist.dat | grep "\bV${ver:0:1}.${ver:1:1}\b"`
ptst=`eval grep "^%base" $aroot/db/pwr_projectlist.dat | grep "[[:<:]]V${ver:0:1}.${ver:1:1}[[:>:]]"`
set -e
if [ "$ptst" = "" ]; then
echo "%base V${ver:0:1}.${ver:1:1} /usr/pwr$ver" >> $aroot/db/pwr_projectlist.dat
......
#!/bin/sh
#!/usr/local/bin/bash
set -e
echo "Here in prerm..."
# Automatically added by dh_installdocs
......@@ -6,3 +6,7 @@ if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/pwrtest ]; then
rm -f /usr/doc/pwrtest
fi
# End automatically added section
dname=`eval dirname $0`
chmod a+x $dname/rmfiles.sh
$dname/rmfiles.sh
......@@ -20,15 +20,19 @@ export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc
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_exe=$pwrp_root/x86_64_openbsd/exe
export pwrp_lib=$pwrp_root/x86_64_openbsd/lib
export pwrp_obj=$pwrp_root/x86_64_openbsd/obj
export pwrp_lis=$pwrp_root/x86_64_openbsd/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
if [ "$web_dir" = "" ]; then
export pwrp_web=$pwrp_root/common/web
else
export pwrp_web=$web_dir
fi
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls -t /usr/local | grep ^jdk`
......@@ -44,10 +48,10 @@ PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
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 pwr_stop='/etc/pwrrt/pwr stop'
alias pwr_stop.sh="/etc/pwrrt/pwr stop"
alias pwr_start="/etc/pwrrt/pwr start"
alias pwr="/etc/pwrrt/pwr"
alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
......
......@@ -95,7 +95,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/openbsd/pwrrt
packagename=pwrrt-$version.tar.gz
# Create directories
......@@ -113,10 +113,6 @@ cp $pkgsrc/copyright $pkgroot/usr/share/doc/pwrrt
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
......@@ -183,6 +179,7 @@ echo "rm -r /usr/pwrrt" >> $pkgroot/etc/pwrrt/rmfiles.sh
cp $pkgsrc/control $pkgroot/etc/pwrrt
cp $pkgsrc/prerm $pkgroot/etc/pwrrt
cp $pkgsrc/postinst $pkgroot/etc/pwrrt
cp $pkgsrc/pwr $pkgroot/etc/pwrrt
tar -czf ../$packagename *
......
Proview V3.4b (3.4.1-1)
\ No newline at end of file
......@@ -181,16 +181,16 @@ chmod u+s /usr/pwrrt/exe/rt_rtt
#chmod u+s /usr/pwrrt/exe/rt_xtt
chmod u+s /usr/pwrrt/exe/rt_bck
chmod u+s /usr/pwrrt/exe/rt_gdhget
chown root /usr/pwrrt/exe/rs_remote_alcm
chmod u+s /usr/pwrrt/exe/rs_remote_alcm
#chown root /usr/pwrrt/exe/rs_remote_alcm
#chmod u+s /usr/pwrrt/exe/rs_remote_alcm
if getent group dialout > /dev/null; then
chgrp dialout /usr/pwrrt/exe/rs_remote_serial
chmod ug+s /usr/pwrrt/exe/rs_remote_serial
chgrp dialout /usr/pwrrt/exe/rs_remote_3964r
chmod ug+s /usr/pwrrt/exe/rs_remote_3964r
fi
chown root /usr/pwrrt/exe/rt_prio
chmod u+s /usr/pwrrt/exe/rt_prio
#chown root /usr/pwrrt/exe/rt_prio
#chmod u+s /usr/pwrrt/exe/rt_prio
chown root /usr/pwrrt/exe/rt_mozilla
chmod u+s /usr/pwrrt/exe/rt_mozilla
......@@ -205,28 +205,18 @@ fi
if ! grep -q "/etc/pwrp_profile[[:>:]]" /etc/profile; then
cat >> /etc/profile <<-EOF
if [ -e /etc/pwrp_profile ]; then
source /etc/pwrp_profile
. /etc/pwrp_profile
fi
EOF
fi
# Create startup link
set +e
checklink=`eval ls /etc/rc2.d/S90pwr 2>/dev/null`
set -e
if [ "$checklink" != "" ]; then
rm /etc/rc2.d/S90pwr
if ! grep -q "/etc/pwrrt/pwr start" /etc/rc.local; then
cat >> /etc/rc.local <<-EOF
/etc/pwrrt/pwr start
EOF
fi
ln -s /etc/init.d/pwr /etc/rc2.d/S90pwr
set +e
checklink=`eval ls /etc/rc2.d/S91gdhserver 2>/dev/null`
set -e
if [ "$checklink" != "" ]; then
rm /etc/rc2.d/S91gdhserver
fi
# Obsolete
#ln -s /etc/init.d/gdhserver /etc/rc2.d/S91gdhserver
# Create project
new_project=0
......
#!/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
......@@ -21,22 +22,22 @@ if [ "$remove_all" = "y" ]; then
user_found=0
currentusers=`eval users`
userstr=""
checkuser=`eval echo $currentusers | grep "\bb55\b"`
checkuser=`eval echo $currentusers | grep "[[:<:]]b55[[:>:]]"`
if [ "$checkuser" != "" ]; then
user_found=1
userstr=$userstr" b55"
fi
checkuser=`eval echo $currentusers | grep "\bb66\b"`
checkuser=`eval echo $currentusers | grep "[[:<:]]b66[[:>:]]"`
if [ "$checkuser" != "" ]; then
user_found=1
userstr=$userstr" b66"
fi
checkuser=`eval echo $currentusers | grep "\bpwrp\b"`
checkuser=`eval echo $currentusers | grep "[[:<:]]pwrp[[:>:]]"`
if [ "$checkuser" != "" ]; then
user_found=1
userstr=$userstr" pwrp"
fi
checkuser=`eval echo $currentusers | grep "\bskiftel\b"`
checkuser=`eval echo $currentusers | grep "[[:<:]]skiftel[[:>:]]"`
if [ "$checkuser" != "" ]; then
user_found=1
userstr=$userstr" skiftel"
......@@ -50,7 +51,7 @@ if [ "$remove_all" = "y" ]; then
set -e
echo "-- Remove user b55"
if grep -q "\bb55:" /etc/passwd; then
if grep -q "[[:<:]]b55:" /etc/passwd; then
userdel b55
fi
if [ -e /home/b55 ]; then
......@@ -58,7 +59,7 @@ if [ "$remove_all" = "y" ]; then
fi
echo "-- Remove user b66"
if grep -q "\bb66:" /etc/passwd; then
if grep -q "[[:<:]]b66:" /etc/passwd; then
userdel b66
fi
if [ -e /home/b66 ]; then
......@@ -66,7 +67,7 @@ if [ "$remove_all" = "y" ]; then
fi
echo "-- Remove user pwrp"
if grep -q "\bpwrp:" /etc/passwd; then
if grep -q "[[:<:]]pwrp:" /etc/passwd; then
userdel pwrp
fi
if [ -e /home/pwrp ]; then
......@@ -74,26 +75,26 @@ if [ "$remove_all" = "y" ]; then
fi
echo "-- Remove user skiftel"
if grep -q "\bskiftel:" /etc/passwd; then
if grep -q "[[:<:]]skiftel:" /etc/passwd; then
userdel skiftel
fi
if [ -e /home/skiftel ]; then
rm -r /home/skiftel
fi
if grep -q "\bb55:" /etc/group; then
if grep -q "[[:<:]]b55:" /etc/group; then
groupdel b55
fi
if grep -q "\bb66:" /etc/group; then
if grep -q "[[:<:]]b66:" /etc/group; then
groupdel b66
fi
if grep -q "\bpwrp:" /etc/group; then
if grep -q "[[:<:]]pwrp:" /etc/group; then
groupdel pwrp
fi
if grep -q "\bskiftel:" /etc/group; then
if grep -q "[[:<:]]skiftel:" /etc/group; then
groupdel skiftel
fi
......@@ -107,15 +108,9 @@ if [ "$remove_all" = "y" ]; then
fi
fi
# Remove startup
checklink=`eval ls /etc/rc2.d/S90pwr 2>/dev/null`
if [ "$checklink" != "" ]; 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}'`
web_dir=`eval cat /etc/proview.cnf | grep "[[:<:]]webDirectory[[:>:]]" | awk '{print $2}'`
if [ -e $web_dir/pwr_rt_client.jar ]; then
rm $web_dir/pwr_rt_client.jar
......@@ -124,3 +119,7 @@ if [ -e /etc/proview.cnf ]; then
rm $web_dir/pwr_jop.jar
fi
fi
dname=`eval dirname $0`
chmod a+x $dname/rmfiles.sh
$dname/rmfiles.sh
bus_id=""
if [ -e /etc/proview.cnf ]; then
bus_id=`eval cat /etc/proview.cnf | grep "\\bqcomBusId\\b" | awk '{print $2}'`
bus_id=`eval cat /etc/proview.cnf | grep "[[:<:]]qcomBusId[[:>:]]" | awk '{print $2}'`
fi
if [ -e /etc/proview.cnf ]; then
web_dir=`eval cat /etc/proview.cnf | grep "\\bwebDirectory\\b" | awk '{print $2}'`
web_dir=`eval cat /etc/proview.cnf | grep "[[:<:]]bwebDirectory[[:>:]]" | awk '{print $2}'`
fi
export PWR_BUS_ID=$bus_id
......@@ -20,20 +20,24 @@ export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc
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_exe=$pwrp_root/x86_64_openbsd/exe
export pwrp_lib=$pwrp_root/x86_64_openbsd/lib
export pwrp_obj=$pwrp_root/x86_64_openbsd/obj
export pwrp_lis=$pwrp_root/x86_64_openbsd/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
if [ "$web_dir" = "" ]; then
export pwrp_web=$pwrp_root/common/web
else
export pwrp_web=$web_dir
fi
export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk`
jdk=`eval ls -t /usr/local | grep ^jdk`
if [ "$jdk" == "" ]; then
jdk=`eval ls -t /usr/local | grep -m 1 ^jre`
jdk=`eval ls -t /usr/local | grep ^jre`
fi
export jdk=/usr/local/$jdk
......@@ -44,10 +48,10 @@ PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
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 pwr_stop='/etc/pwrrt/pwr stop'
alias pwr_stop.sh="/etc/pwrrt/pwr stop"
alias pwr_start="/etc/pwrrt/pwr start"
alias pwr="/etc/pwrrt/pwr"
alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
......
......@@ -29,7 +29,8 @@ copy :
lib :
exe : $(bld_dir)/control_pwrrt $(bld_dir)/control_pwr $(bld_dir)/control_pwrdemo $(bld_dir)/control_pwrsev
#exe : $(bld_dir)/control_pwrrt $(bld_dir)/control_pwr $(bld_dir)/control_pwrdemo $(bld_dir)/control_pwrsev
exe : $(bld_dir)/control_pwr $(bld_dir)/control_pwrrt
clean :
......
......@@ -571,6 +571,18 @@ page_4:
if ( os == "MacOS")
SetAttribute( attr, 256);
endif
if ( os == "ARM")
SetAttribute( attr, 512);
endif
if ( os == "FreeBSD")
SetAttribute( attr, 1024);
endif
if ( os == "OpenBSD")
SetAttribute( attr, 2048);
endif
if ( os == "Cygwin")
SetAttribute( attr, 4098);
endif
attr = name + ".Address";
SetAttribute( attr, node_ip[i]);
......
......@@ -158,8 +158,17 @@ page_4:
set attr/name='str1'/attr=OperatingSystem/value=64/nolog/noconf
endif
endif
if ( os == "MacOS")
set attr/name='str1'/attr=OperatingSystem/value=256/nolog/noconf
if ( os == "ARM")
set attr/name='str1'/attr=OperatingSystem/value=512/nolog/noconf
endif
if ( os == "FreeBSD")
set attr/name='str1'/attr=OperatingSystem/value=1024/nolog/noconf
endif
if ( os == "OpenBSD")
set attr/name='str1'/attr=OperatingSystem/value=2048/nolog/noconf
endif
if ( os == "Cygwin")
set attr/name='str1'/attr=OperatingSystem/value=4096/nolog/noconf
endif
if ( rv_nodehierroot != "")
......
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