Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
ab1e6d83
Commit
ab1e6d83
authored
Mar 04, 2020
by
Marcus Nordenberg
Committed by
Esteban Blanc
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pkg: fixed some issues with pwrrt package
(cherry picked from commit d9b814bae42600f4cf722d635f46c883c31c3525)
parent
5b5d1256
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
27 deletions
+30
-27
src/tools/pkg/deb_x86_64/pwrrt/postinst
src/tools/pkg/deb_x86_64/pwrrt/postinst
+7
-8
src/tools/pkg/deb_x86_64/pwrrt/postrm
src/tools/pkg/deb_x86_64/pwrrt/postrm
+2
-0
src/tools/pkg/deb_x86_64/pwrrt/prerm
src/tools/pkg/deb_x86_64/pwrrt/prerm
+20
-18
src/tools/pkg/deb_x86_64/pwrrt/pwrp_profile
src/tools/pkg/deb_x86_64/pwrrt/pwrp_profile
+1
-1
No files found.
src/tools/pkg/deb_x86_64/pwrrt/postinst
View file @
ab1e6d83
...
@@ -92,6 +92,7 @@ else
...
@@ -92,6 +92,7 @@ else
fi
fi
fi
fi
# Add the user b66
if
getent passwd b66
>
/dev/null
;
then
if
getent passwd b66
>
/dev/null
;
then
echo
"-- User b66 already exist. OK!"
echo
"-- User b66 already exist. OK!"
else
else
...
@@ -143,14 +144,12 @@ if [ ! -e /etc/proview.cnf ]; then
...
@@ -143,14 +144,12 @@ if [ ! -e /etc/proview.cnf ]; then
new_cnf
=
1
new_cnf
=
1
fi
fi
# Source pwrp_profile from both profile and bash.bashrc
# Source pwrp_profile in login shells
for
cnf_file
in
/etc/profile /etc/bash.bashrc
;
do
if
[
!
-e
/etc/profile/pwrp_profile.sh
]
;
then
if
!
grep
-q
"/etc/pwrp_profile
\b
"
${
cnf_file
}
;
then
# profile.d should always exist on a modern debian system. BUT if it doesn't we create it :)
cat
>>
${
cnf_file
}
<<-
EOF
if
[
!
-e
/etc/profile.d
]
;
then
mkdir
/etc/profile.d
;
fi
[[ -e /etc/pwrp_profile ]] && . /etc/pwrp_profile
echo
"[[ -e /etc/pwrp_profile ]] && . /etc/pwrp_profile"
>
/etc/profile.d/pwrp_profile.sh
EOF
fi
fi
done
# Create startup link
# Create startup link
# set +e
# set +e
...
...
src/tools/pkg/deb_x86_64/pwrrt/postrm
View file @
ab1e6d83
...
@@ -7,3 +7,5 @@ if [ "$1" = "purge" -a -e /etc/proview.cnf ]; then
...
@@ -7,3 +7,5 @@ if [ "$1" = "purge" -a -e /etc/proview.cnf ]; then
rm
/etc/proview.cnf
rm
/etc/proview.cnf
echo
"-- Purged /etc/proview.cnf"
echo
"-- Purged /etc/proview.cnf"
fi
fi
if
[
-e
/etc/profile.d/pwrp_profile.sh
]
;
then
rm
/etc/profile.d/pwrp_profile.sh
;
fi
src/tools/pkg/deb_x86_64/pwrrt/prerm
View file @
ab1e6d83
...
@@ -14,10 +14,11 @@ fi
...
@@ -14,10 +14,11 @@ fi
proot
=
"/pwrp"
proot
=
"/pwrp"
aroot
=
"/usr/pwrp"
aroot
=
"/usr/pwrp"
echo
""
if
[
!
"
$1
"
=
"upgrade"
]
;
then
echo
-n
"Do you want to remove project and users (y/n) [n] "
echo
""
read
remove_all
echo
-n
"Do you want to remove project and users (y/n) [n] "
if
[
"
$remove_all
"
=
"y"
]
;
then
read
remove_all
if
[
"
$remove_all
"
=
"y"
]
;
then
for
user
in
pwrp skiftel b55 b66
;
do
for
user
in
pwrp skiftel b55 b66
;
do
getent passwd
${
user
}
>
/dev/null 2>&1
&&
userdel
-rf
${
user
}
2>/dev/null
getent passwd
${
user
}
>
/dev/null 2>&1
&&
userdel
-rf
${
user
}
2>/dev/null
echo
"-- Removed user
${
user
}
"
echo
"-- Removed user
${
user
}
"
...
@@ -31,7 +32,8 @@ if [ "$remove_all" = "y" ]; then
...
@@ -31,7 +32,8 @@ if [ "$remove_all" = "y" ]; then
rm
-r
$proot
&&
echo
"-- Removed project
$proot
"
rm
-r
$proot
&&
echo
"-- Removed project
$proot
"
fi
fi
if
[
-e
$aroot
]
;
then
if
[
-e
$aroot
]
;
then
rm
-r
$aroot
&&
echo
"-- Removed admin directory
$proot
"
rm
-r
$aroot
&&
echo
"-- Removed admin directory
$aroot
"
fi
fi
fi
fi
fi
...
...
src/tools/pkg/deb_x86_64/pwrrt/pwrp_profile
View file @
ab1e6d83
...
@@ -19,7 +19,7 @@ export pwr_load=$pwrb_root/load
...
@@ -19,7 +19,7 @@ export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc
export pwr_doc=$pwrb_root/doc
# Fetch arch
# Fetch arch
(In the rare cases where we run 32-bit proview on 64-bit debian)
if [ -e /pwrp ]; then
if [ -e /pwrp ]; then
for dir in `ls -1 /pwrp`; do
for dir in `ls -1 /pwrp`; do
[[ "${dir}" == "common" ]] && continue
[[ "${dir}" == "common" ]] && continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment