Commit 4a01e965 authored by Claes Sjofors's avatar Claes Sjofors

Merge branch 'master' of pwrcvs:/data1/git/pwr

parents 0f4e59ad bb2ed34f
INSTALLATION GUIDE DEBIAN INSTALLATION GUIDE DEBIAN
------------------------- -------------------------
Debian distribution: Debian Sarge Debian distribution: Debian Lenny/Sid
System Requirements: System Requirements:
Platform: x86 Platform: x86
Kernel: >= 2.6.6 Kernel: >= 2.6.26
glibc: >= 2.3.6 glibc: >= 2.7.14
See specific package information below: See specific package information below:
1. PACKAGE PWR44 1. PACKAGE PWR46
---------------- ----------------
Dependencies: Dependencies:
GTK+ v2.0 (libgtk2.0) libgtk2.0-0 >= 2.12.11-4
Berkeley DB v4.3.29 (libdb4.3, libdb++4.3) libasound2 >= 1.0.16-2
Alsa v1.0.11 (libasound2) libdb4.6 >= 4.6.21-11
libdb4.6++ >= 4.6.21-11
libmysqlclient15off >= 5.0.51a-15
g++ >= 4:4.3.2-2
Install with dpkg Install with dpkg
...@@ -26,7 +29,7 @@ dpkg doesn't check any dependency, and all the depedencies package has to be ins ...@@ -26,7 +29,7 @@ dpkg doesn't check any dependency, and all the depedencies package has to be ins
Download your selected debian-package and install it as: Download your selected debian-package and install it as:
> dpkg -i pwr44_4.4.x-x_i386.deb > dpkg -i pwr46_4.6.x-x_i386.deb
During installation the files will be unpacked and a user named 'pwrp' During installation the files will be unpacked and a user named 'pwrp'
belonging to a group with the same name 'pwrp' will be created. belonging to a group with the same name 'pwrp' will be created.
...@@ -53,11 +56,11 @@ Update apt with the new packages ...@@ -53,11 +56,11 @@ Update apt with the new packages
Check that the packages are found Check that the packages are found
> apt-cache search pwr > apt-cache search pwr
pwr44 - Proview development and runtime environment package pwr46 - Proview development and runtime environment package
pwrdemo44 - Proview Demo Project package pwrdemo46 - Proview Demo Project package
Install Install
> apt-get install pwr44 > apt-get install pwr46
Getting started: Getting started:
...@@ -74,51 +77,52 @@ will help you taking the first steps. ...@@ -74,51 +77,52 @@ will help you taking the first steps.
Dependencies: Dependencies:
GTK+ v2.0 (libgtk2.0) libgtk2.0-0 >= 2.12.11-4
Berkeley DB v4.3.29 (libdb4.3) libasound2 >= 1.0.16-2
Alsa v1.0.11 (libasound2) libdb4.6 >= 4.6.21-11
Download: Download:
Download your selected debian-package and install it as: Download your selected debian-package and install it as:
> dpkg -i pwrrt_4.4.x-x_i386.deb > dpkg -i pwrrt_4.6.x-x_i386.deb
Information: Information:
The runtime package should be installed "stand-alone" without the pwr44-package. The runtime package should be installed "stand-alone" without the pwr46-package.
A linux-system with the pwrrt-package is your control-system. Proview will be A linux-system with the pwrrt-package is your control-system. Proview will be
started automatically at boot-time. started automatically at boot-time.
3. PACKAGE PWRDEMO44 3. PACKAGE PWRDEMO46
-------------------- --------------------
The proview demo project is under construction and contains so far The demo package installs a Proview project that contains a demo of
a demo of the dynamics and components of the HMI. of the dynamics and components of the HMI, some application examples,
a level and a temperature control, and some examples of basecomponent.
Dependencies: Dependencies:
pwr44 V4.4.x pwr46 V4.6.x
Download: Download:
Download your selected debian-package and install with dpkg Download your selected debian-package and install with dpkg
> dpkg -i pwrdemo44_4.4.x-x_i386.deb > dpkg -i pwrdemo46_4.6.x-x_i386.deb
or install with apt (see section 1) or install with apt (see section 1)
> apt-get install pwrdemo44 > apt-get install pwrdemo46
Getting started: Getting started:
Log in as user 'pwrp' (or "su - pwrp") with password 'pwrp'. On the user Log in as user 'pwrp' (or "su - pwrp") with password 'pwrp'. On the user
'pwrp' a correct environment for working with Proview will be set up. 'pwrp' a correct environment for working with Proview will be set up.
A demonstration project named pwrdemo44 is created. A demonstration project named pwrdemo46 is created.
Attach to the project with Attach to the project with
> sdf pwrdemo44 > sdf pwrdemo46
Start proview runtime environment with Start proview runtime environment with
...@@ -133,6 +137,31 @@ Press the 'PwrDemo' button in the operator window. ...@@ -133,6 +137,31 @@ Press the 'PwrDemo' button in the operator window.
Stop and reset the environment with Stop and reset the environment with
> . pwr_stop.sh > . pwr_stop.sh
4. PACKAGE PWRSEV
-----------------
Install mysql-client and mysql-server.
Create a repository first and install with apt
> apt-get install pwrsev
Install with dpkg
-----------------
dbkg doesn't check any depedencies. You have to check that these packages are installed
libgtk2.0-0 >= 2.12.11-4
libasound2 >= 1.0.16-2
libdb4.6 >= 4.6.21-11
libmysqlclient15off >= 5.0.51a-15
> dpkg -i pwrsev_4.6.0-3_i386.deb
Information:
The storage environment package should be installed "stand-alone" without the
pwr46 or pwrrt package.
......
INSTALLATION GUIDE FEDORA INSTALLATION GUIDE FEDORA
-------------------------- --------------------------
Release Fedora 10
System Requirements: System Requirements:
Platform: x86 Platform: x86
Kernel: >= 2.6.6 Kernel >= 2.6.26.5
glibc: >= 2.3.4 glibc >= 2.9-2
Specific package information follow below: Specific package information follow below:
1. PACKAGE PWR45 1. PACKAGE PWR46
---------------- ----------------
Dependencies: Dependencies:
Berkeley DB v4.5 alsa-lib >= 1.0.18-6
Alsa v1.0.14 db4 >= 4.7.25-5
db4-cxx >= 4.7.25-5
gtk2 >= 2.14.4-3
mysql >= 5.0.67-2
gcc-c++ >= 4.3.2-7
Download: Download:
Download your selected rpm-package and install it as: Download your selected rpm-package and install it as:
rpm -Uvh pwr45_4.5.0-1.fedora.i386.rpm rpm -Uvh pwr46_4.6.0-3.fedora.i386.rpm
During installation the files will be unpacked and a user named 'pwrp' During installation the files will be unpacked and a user named 'pwrp'
belonging to a group with the same name 'pwrp' will be created. belonging to a group with the same name 'pwrp' will be created.
...@@ -41,22 +48,23 @@ will help you taking the first steps. ...@@ -41,22 +48,23 @@ will help you taking the first steps.
Dependencies: Dependencies:
Berkeley DB v4.5 alsa-lib >= 1.0.18-6
Alsa v1.0.14 db4 >= 4.7.25-5
gtk2 >= 2.14.4-3
Download: Download:
Download your selected rpm-package and install it as: Download your selected rpm-package and install it as:
rpm -Uvh pwrrt_4.5.0-1.fedora.i386.rpm rpm -Uvh pwrrt_4.6.0-1.fedora.i386.rpm
Information: Information:
The runtime package should be installed "stand-alone" without the pwr45-package. The runtime package should be installed "stand-alone" without the pwr46-package.
A linux-system with the pwrrt-package is your control-system. Proview will be A linux-system with the pwrrt-package is your control-system. Proview will be
started automatically at boot-time. started automatically at boot-time.
3. PACKAGE PWRDEMO45 3. PACKAGE PWRDEMO46
-------------------- --------------------
The proview demo project contains demo of HMI functions, component objects, and some The proview demo project contains demo of HMI functions, component objects, and some
...@@ -64,23 +72,23 @@ process control applications. ...@@ -64,23 +72,23 @@ process control applications.
Dependencies: Dependencies:
pwr45 V4.5.0 pwr46 V4.6.0-3
Download: Download:
Download your selected rpm-package and install it as: Download your selected rpm-package and install it as:
rpm -Uvh pwrdemo45_4.5.0-1.fedora.i386.deb rpm -Uvh pwrdemo46_4.6.0-3.fedora.i386.deb
Getting started: Getting started:
Log in as user 'pwrp' (or "su - pwrp") with password 'pwrp'. On the user Log in as user 'pwrp' (or "su - pwrp") with password 'pwrp'. On the user
'pwrp' a correct environment for working with Proview will be set up. 'pwrp' a correct environment for working with Proview will be set up.
A demonstration project named pwrdemo45 is created. A demonstration project named pwrdemo46 is created.
Attach to the project with Attach to the project with
> sdf pwrdemo45 > sdf pwrdemo46
Start proview runtime environment with Start proview runtime environment with
...@@ -92,4 +100,26 @@ Start the operator environment with ...@@ -92,4 +100,26 @@ Start the operator environment with
Press the 'PwrDemo' button in the operator window and Press the 'PwrDemo' button in the operator window and
4. PACKAGE PWRSEV
-----------------
Install mysql and mysql-server.
Dependencies:
alsa-lib >= 1.0.18-6
db4 >= 4.7.25-5
gtk2 >= 2.14.4-3
mysql >= 5.0.67-2
Download:
Download your selected rpm-package and install it as:
rpm -Uvh pwrsev_4.6.0-1.fedora.i386.rpm
Information:
The storage environment package should be installed "stand-alone" without the
pwr46 or pwrrt package.
INSTALLATION GUIDE UBUNTU INSTALLATION GUIDE UBUNTU
------------------------- -------------------------
Release Ubuntu 8.10
System Requirements: System Requirements:
Platform: x86 Platform: x86
Kernel: >= 2.6.6 Kernel >= 2.6.27
glibc: >= 2.5-0ubuntu14 glibc >= 2.8-0ubuntu7
See specific package information below: See specific package information below:
...@@ -15,7 +17,7 @@ See specific package information below: ...@@ -15,7 +17,7 @@ See specific package information below:
Install with apt Install with apt
---------------- ----------------
Create a repository first, see section 4 below Create a repository first, see section 5 below
> apt-get install pwr45 > apt-get install pwr45
...@@ -23,13 +25,14 @@ Install with dpkg ...@@ -23,13 +25,14 @@ Install with dpkg
----------------- -----------------
dbkg doesn't check any depedencies. You have to check that these packages are installed dbkg doesn't check any depedencies. You have to check that these packages are installed
libgtk2.0-0 (>= 2.10.11-0ubuntu3) libgtk2.0-0 >= 2.14.4-0ubuntu1
libasound2 (>= 1.0.13-1ubuntu5) libasound2 >= 1.0.17a-0ubuntu4
libdb4.4 (>=4.4.20-8ubuntu2) libdb4.7 >= 4.7.25-3
libmysqlclient15off (>=5.0.38-0ubuntu1) libdb4.7++ >= 4.7.25-3
g++-4.1 (>=4.1.2-0ubuntu4) libmysqlclient15off >= 5.0.67-0ubuntu6)
g++-4.1 >= 4:4.3.1-1ubuntu2)
> dpkg -i pwrdemo45_4.5.0-1ubuntu_i386.deb > dpkg -i pwrdemo46_4.6.0-3ubuntu_i386.deb
Getting started Getting started
--------------- ---------------
...@@ -45,17 +48,17 @@ will help you taking the first steps. ...@@ -45,17 +48,17 @@ will help you taking the first steps.
3. PACKAGE PWRDEMO45 3. PACKAGE PWRDEMO45
-------------------- --------------------
pwr45 has to be installed. pwr46 has to be installed.
Install with apt Install with apt
---------------- ----------------
> apt-get install pwrdemo44 > apt-get install pwrdemo46
Install with dpkg Install with dpkg
----------------- -----------------
> dpkg -i pwrdemo45_4.5.0-1ubuntu_i386.deb > dpkg -i pwrdemo46_4.6.0-3ubuntu_i386.deb
Getting started Getting started
--------------- ---------------
...@@ -63,10 +66,10 @@ Getting started ...@@ -63,10 +66,10 @@ Getting started
Log in as user 'pwrp' (or "su - pwrp") with password 'pwrp'. On the user Log in as user 'pwrp' (or "su - pwrp") with password 'pwrp'. On the user
'pwrp' a correct environment for working with Proview will be set up. 'pwrp' a correct environment for working with Proview will be set up.
A demonstration project named pwrdemo45 is created. A demonstration project named pwrdemo46 is created.
Attach to the project with Attach to the project with
> sdf pwrdemo45 > sdf pwrdemo46
Start proview runtime environment with Start proview runtime environment with
...@@ -85,7 +88,7 @@ Stop and reset the environment with ...@@ -85,7 +88,7 @@ Stop and reset the environment with
3. PACKAGE PWRRT 3. PACKAGE PWRRT
---------------- ----------------
Create a repository first, see section 4 below Create a repository first, see section 5 below
> apt-get install pwrrt > apt-get install pwrrt
...@@ -93,20 +96,46 @@ Install with dpkg ...@@ -93,20 +96,46 @@ Install with dpkg
----------------- -----------------
dbkg doesn't check any depedencies. You have to check that these packages are installed dbkg doesn't check any depedencies. You have to check that these packages are installed
libgtk2.0-0 (>= 2.10.11-0ubuntu3) libgtk2.0-0 >= 2.14.4-0ubuntu1
libasound2 (>= 1.0.13-1ubuntu5) libasound2 >= 1.0.17a-0ubuntu4
libdb4.4 (>=4.4.20-8ubuntu2) libdb4.7 >= 4.7.25-3
> dpkg -i pwrrt_4.5.0-1ubuntu_i386.deb > dpkg -i pwrrt_4.6.0-3ubuntu_i386.deb
Information: Information:
The runtime package should be installed "stand-alone" without the pwr45-package. The runtime package should be installed "stand-alone" without the pwr46-package.
A linux-system with the pwrrt-package is your control- or HMI-system. Proview will be A linux-system with the pwrrt-package is your control- or HMI-system. Proview will be
started automatically at boot-time. started automatically at boot-time.
4. CREATE APT REPOSITORY 3. PACKAGE PWRSEV
----------------
Install mysql-client and mysql-server.
Create a repository first, see section 5 below
> apt-get install pwrsev
Install with dpkg
-----------------
dbkg doesn't check any depedencies. You have to check that these packages are installed
libgtk2.0-0 >= 2.14.4-0ubuntu1
libasound2 >= 1.0.17a-0ubuntu4
libdb4.7 >= 4.7.25-3
libmysqlclient15off >= 5.0.67-0ubuntu6)
> dpkg -i pwrsev_4.6.0-3ubuntu_i386.deb
Information:
The storage environment package should be installed "stand-alone" without the
pwr46 or pwrrt package.
5. CREATE APT REPOSITORY
------------------------ ------------------------
Login in a root. Login in a root.
...@@ -136,8 +165,8 @@ Update apt with the new packages ...@@ -136,8 +165,8 @@ Update apt with the new packages
Check that the packages are found Check that the packages are found
> apt-cache search pwr > apt-cache search pwr
pwr45 - Proview development and runtime environment package pwr46 - Proview development and runtime environment package
pwrdemo45 - Proview Demo Project package pwrdemo46 - Proview Demo Project package
pwrrt - Proview runtime environment pwrrt - Proview runtime environment
If the command g++ is unknown you have to create the link If the command g++ is unknown you have to create the link
......
Package: pwr46 Package: pwr46
Version: 4.6.0-1 Version: 4.6.0-4
Section: base Section: base
Priority: optional Priority: optional
Architecture: i386 Architecture: i386
Depends: libc6 (>= 2.7-13), libgtk2.0-0 (>= 2.12.11-3), libasound2 (>= 1.0.16-2), libdb4.6 (>=4.6.21-11), libdb4.3++c2 (>= 4.6.21-11), libmysqlclient15off (>= 5.0.51a-15), g++ (>= 4:4.3.2-2) Depends: libc6 (>= 2.7-14), libgtk2.0-0 (>= 2.12.11-4), libasound2 (>= 1.0.16-2), libdb4.6 (>=4.6.21-11), libdb4.6++ (>= 4.6.0-4), libmysqlclient15off (>= 5.0.51a-15), g++ (>= 4:4.3.2-2)
Replaces: pwrrt,pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45 Replaces: pwrrt,pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45
Maintainer: Proview <postmaster@proview.se> Maintainer: Proview <postmaster@proview.se>
Description: Proview development and runtime environment package Description: Proview development and runtime environment package
Proview development and runtime environment Proview development and runtime environment
4.6.0-1 Base release 4.6.0-1 Base release
4.6.0-2
- Ge color gradients added.
4.6.0-3
- Sev: error handling improved.
4.6.0-4
- Metric fonts in Ge and Xtt.
Package: pwrdemo46 Package: pwrdemo46
Version: 4.6.0-1 Version: 4.6.0-4
Section: base Section: base
Priority: optional Priority: optional
Architecture: i386 Architecture: i386
Depends: pwr46 (>= 4.6.0-1) Depends: pwr46 (>= 4.6.0-4)
Maintainer: Proview <postmaster@proview.se> Maintainer: Proview <postmaster@proview.se>
Description: Proview Demo Project package Description: Proview Demo Project package
Proview Demo Project Proview Demo Project
......
Package: pwrrt Package: pwrrt
Version: 4.6.0-1 Version: 4.6.0-4
Section: base Section: base
Priority: optional Priority: optional
Architecture: i386 Architecture: i386
Depends: libc6 (>= 2.7-13), libgtk2.0-0 (>= 2.12.11-3), libasound2 (>= 1.0.16-2), libdb4.6 (>=4.6.21-11) Depends: libc6 (>= 2.7-14), libgtk2.0-0 (>= 2.12.11-4), libasound2 (>= 1.0.16-2), libdb4.6 (>=4.6.21-11)
Replaces: pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45 Replaces: pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45,pwr46
Maintainer: Proview <postmaster@proview.se> Maintainer: Proview <postmaster@proview.se>
Description: Description:
Proview runtime environment Proview runtime environment
4.6.0-1 Base release 4.6.0-1 Base release
4.6.0-2
- Ge color gradients added.
4.6.0-3
- Sev: error handling improved.
4.6.0-4
- Metric fonts in Ge and Xtt.
Package: pwrsev Package: pwrsev
Version: 4.6.0-1 Version: 4.6.0-4
Section: base Section: base
Priority: optional Priority: optional
Architecture: i386 Architecture: i386
Depends: libc6 (>= 2.7-13), libgtk2.0-0 (>= 2.12.11-3), libasound2 (>= 1.0.16-2), libdb4.6 (>=4.6.21-11) Depends: libc6 (>= 2.7-14), libgtk2.0-0 (>= 2.12.11-4), libasound2 (>= 1.0.16-2), libdb4.6 (>=4.6.21-11), libmysqlclient15off (>= 5.0.51a-15)
Replaces: pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45 Replaces: pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45
Maintainer: Proview <postmaster@proview.se> Maintainer: Proview <postmaster@proview.se>
Description: Description:
Proview storage environment Proview storage environment
4.6.0-1 Beta release 4.6.0-1 Beta release
4.6.0-3
- Sev: error handling improved.
4.6.0-4
- Metric fonts in Ge and Xtt.
...@@ -79,6 +79,14 @@ cat > $initsh <<EOF ...@@ -79,6 +79,14 @@ cat > $initsh <<EOF
source $aroot/db/pwr_setup.sh source $aroot/db/pwr_setup.sh
source \$pwr_exe/pwrp_env.sh set project pwrdemo%{ver} source \$pwr_exe/pwrp_env.sh set project pwrdemo%{ver}
if [ ! -e "\$pwrp_db/directory.db" ]; then
wb_cmd create volume/directory
wb_cmd wb load /load=\"\$pwrp_db/directory.wb_dmp\"
fi
if [ ! -e "\$pwrp_db/volpwrdemo.db" ]; then
wb_cmd wb load /load=\"\$pwrp_db/volpwrdemo.wb_dmp\"
fi
wb_cmd @$initpwrc wb_cmd @$initpwrc
EOF EOF
...@@ -100,7 +108,6 @@ sudo -u pwrp $initsh ...@@ -100,7 +108,6 @@ sudo -u pwrp $initsh
rm $initsh rm $initsh
rm $initpwrc rm $initpwrc
ls
%preun %preun
......
...@@ -112,7 +112,9 @@ mkdir -p $pkgroot/rpm/SPECS ...@@ -112,7 +112,9 @@ mkdir -p $pkgroot/rpm/SPECS
mkdir -p $pkgroot/rpm/SOURCES mkdir -p $pkgroot/rpm/SOURCES
mkdir -p $pkgroot/rpm/SRPMS mkdir -p $pkgroot/rpm/SRPMS
mkdir -p $pkgroot/usr/share/doc/pwrrt mkdir -p $pkgroot/usr/share/doc/pwrrt
mkdir -p $pkgroot/etc/init.d mkdir -p $pkgroot/etc
# init.d is a symlink on fedora that is owned by with chkconfig and causes conflict
#mkdir -p $pkgroot/etc/init.d
find $pkgroot -type d | xargs chmod 755 find $pkgroot -type d | xargs chmod 755
...@@ -126,8 +128,8 @@ gzip -fq --best $pkgroot/usr/share/doc/pwrrt/changelog ...@@ -126,8 +128,8 @@ gzip -fq --best $pkgroot/usr/share/doc/pwrrt/changelog
# Startup files # Startup files
cp $pkgsrc/pwrp_profile $pkgroot/etc cp $pkgsrc/pwrp_profile $pkgroot/etc
chmod a+x $pkgroot/etc/pwrp_profile chmod a+x $pkgroot/etc/pwrp_profile
cp $pkgsrc/pwr $pkgroot/etc/init.d #cp $pkgsrc/pwr $pkgroot/etc/init.d
chmod a+x $pkgroot/etc/init.d/pwr #chmod a+x $pkgroot/etc/init.d/pwr
# Man pages # Man pages
mkdir -p $pkgroot/usr/share/man/man1 mkdir -p $pkgroot/usr/share/man/man1
...@@ -157,6 +159,7 @@ cd $currentdir ...@@ -157,6 +159,7 @@ cd $currentdir
# Copy configuration files to cnf # Copy configuration files to cnf
cp $pkgsrc/proview.cnf $pkgroot/usr/pwrrt/cnf cp $pkgsrc/proview.cnf $pkgroot/usr/pwrrt/cnf
cp $pkgsrc/pwr $pkgroot/usr/pwrrt/cnf
# Copy op to cnf # Copy op to cnf
mkdir $pkgroot/usr/pwrrt/cnf/op mkdir $pkgroot/usr/pwrrt/cnf/op
......
...@@ -117,7 +117,7 @@ else ...@@ -117,7 +117,7 @@ else
fi fi
fi fi
new_user=0
if getent passwd pwrp > /dev/null; then if getent passwd pwrp > /dev/null; then
echo "-- user pwrp already exist" echo "-- user pwrp already exist"
else else
...@@ -213,6 +213,9 @@ if [ ! -e /etc/proview.cnf ]; then ...@@ -213,6 +213,9 @@ if [ ! -e /etc/proview.cnf ]; then
cp /usr/pwrrt/cnf/proview.cnf /etc cp /usr/pwrrt/cnf/proview.cnf /etc
new_cnf=1 new_cnf=1
fi fi
cp /usr/pwrrt/cnf/pwr /etc/init.d
chmod a+x /etc/init.d/pwr
# Add pwrp_profile to profile # Add pwrp_profile to profile
if ! grep -q "/etc/pwrp_profile\b" /etc/profile; then if ! grep -q "/etc/pwrp_profile\b" /etc/profile; then
......
...@@ -115,7 +115,9 @@ mkdir -p $pkgroot/rpm/SPECS ...@@ -115,7 +115,9 @@ mkdir -p $pkgroot/rpm/SPECS
mkdir -p $pkgroot/rpm/SOURCES mkdir -p $pkgroot/rpm/SOURCES
mkdir -p $pkgroot/rpm/SRPMS mkdir -p $pkgroot/rpm/SRPMS
mkdir -p $pkgroot/usr/share/doc/pwrsev mkdir -p $pkgroot/usr/share/doc/pwrsev
mkdir -p $pkgroot/etc/init.d mkdir -p $pkgroot/etc
# init.d is a symlink on fedora that is owned by with chkconfig and causes conflict
# mkdir $pkgroot/etc/init.d
find $pkgroot -type d | xargs chmod 755 find $pkgroot -type d | xargs chmod 755
...@@ -129,8 +131,8 @@ gzip -fq --best $pkgroot/usr/share/doc/pwrsev/changelog ...@@ -129,8 +131,8 @@ gzip -fq --best $pkgroot/usr/share/doc/pwrsev/changelog
# Startup files # Startup files
cp $pkgsrc/pwrp_profile $pkgroot/etc cp $pkgsrc/pwrp_profile $pkgroot/etc
chmod a+x $pkgroot/etc/pwrp_profile chmod a+x $pkgroot/etc/pwrp_profile
cp $pkgsrc/pwrsev $pkgroot/etc/init.d #cp $pkgsrc/pwrsev $pkgroot/etc/init.d
chmod a+x $pkgroot/etc/init.d/pwrsev #chmod a+x $pkgroot/etc/init.d/pwrsev
# Man pages # Man pages
mkdir -p $pkgroot/usr/share/man/man1 mkdir -p $pkgroot/usr/share/man/man1
...@@ -157,6 +159,7 @@ cd $currentdir ...@@ -157,6 +159,7 @@ cd $currentdir
# Copy configuration files to cnf # Copy configuration files to cnf
cp $pkgsrc/proview.cnf $pkgroot/usr/pwrsev/cnf cp $pkgsrc/proview.cnf $pkgroot/usr/pwrsev/cnf
cp $pkgsrc/pwrsev $pkgroot/usr/pwrsev/cnf
# Copy op to cnf # Copy op to cnf
mkdir $pkgroot/usr/pwrsev/cnf/op mkdir $pkgroot/usr/pwrsev/cnf/op
......
...@@ -114,7 +114,7 @@ else ...@@ -114,7 +114,7 @@ else
fi fi
fi fi
new_user=0
if getent passwd pwrp > /dev/null; then if getent passwd pwrp > /dev/null; then
echo "-- user pwrp already exist" echo "-- user pwrp already exist"
else else
...@@ -203,6 +203,8 @@ if [ ! -e /etc/proview.cnf ]; then ...@@ -203,6 +203,8 @@ if [ ! -e /etc/proview.cnf ]; then
cp /usr/pwrsev/cnf/proview.cnf /etc cp /usr/pwrsev/cnf/proview.cnf /etc
new_cnf=1 new_cnf=1
fi fi
cp /usr/pwrsev/cnf/pwrsev /etc/init.d
chmod a+x /etc/init.d/pwrsev
# Add pwrp_profile to profile # Add pwrp_profile to profile
if ! grep -q "/etc/pwrp_profile\b" /etc/profile; then if ! grep -q "/etc/pwrp_profile\b" /etc/profile; then
...@@ -391,14 +393,14 @@ fi ...@@ -391,14 +393,14 @@ fi
# Remove startup # Remove startup
if [ -e /etc/init.d/rc2.d ]; then if [ -e /etc/init.d/rc2.d ]; then
checklink=`eval ls /etc/init.d/rc2.d/S90pwr 2>/dev/null` checklink=`eval ls /etc/init.d/rc2.d/S90pwrsev 2>/dev/null`
if [ "$checklink" != "" ]; then if [ "$checklink" != "" ]; then
rm /etc/init.d/rc2.d/S90pwr rm /etc/init.d/rc2.d/S90pwrsev
fi fi
elif [ -e /etc/rc2.d ]; then elif [ -e /etc/rc2.d ]; then
checklink=`eval ls /etc/rc2.d/S90pwr 2>/dev/null` checklink=`eval ls /etc/rc2.d/S90pwrsev 2>/dev/null`
if [ "$checklink" != "" ]; then if [ "$checklink" != "" ]; then
rm /etc/rc2.d/S90pwr rm /etc/rc2.d/S90pwrsev
fi fi
fi fi
......
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