Commit 4ffadc1f authored by claes's avatar claes

Conflict with chkconfig (/etc/init.d) avoided in fedora

parent 01de90ca
...@@ -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