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
Hide 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
fi
fi
# Add the user b66
if
getent passwd b66
>
/dev/null
;
then
echo
"-- User b66 already exist. OK!"
else
...
...
@@ -143,14 +144,12 @@ if [ ! -e /etc/proview.cnf ]; then
new_cnf
=
1
fi
# Source pwrp_profile from both profile and bash.bashrc
for
cnf_file
in
/etc/profile /etc/bash.bashrc
;
do
if
!
grep
-q
"/etc/pwrp_profile
\b
"
${
cnf_file
}
;
then
cat
>>
${
cnf_file
}
<<-
EOF
[[ -e /etc/pwrp_profile ]] && . /etc/pwrp_profile
EOF
fi
done
# Source pwrp_profile in login shells
if
[
!
-e
/etc/profile/pwrp_profile.sh
]
;
then
# profile.d should always exist on a modern debian system. BUT if it doesn't we create it :)
if
[
!
-e
/etc/profile.d
]
;
then
mkdir
/etc/profile.d
;
fi
echo
"[[ -e /etc/pwrp_profile ]] && . /etc/pwrp_profile"
>
/etc/profile.d/pwrp_profile.sh
fi
# Create startup link
# 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
rm
/etc/proview.cnf
echo
"-- Purged /etc/proview.cnf"
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,24 +14,26 @@ fi
proot
=
"/pwrp"
aroot
=
"/usr/pwrp"
echo
""
echo
-n
"Do you want to remove project and users (y/n) [n] "
read
remove_all
if
[
"
$remove_all
"
=
"y"
]
;
then
for
user
in
pwrp skiftel b55 b66
;
do
getent passwd
${
user
}
>
/dev/null 2>&1
&&
userdel
-rf
${
user
}
2>/dev/null
echo
"-- Removed user
${
user
}
"
done
for
grp
in
pwrp skiftel b55 b66
;
do
getent group
${
grp
}
>
/dev/null 2>&1
&&
groupdel
${
grp
}
echo
"-- Removed group
${
grp
}
"
done
echo
"-- Removing projects..."
if
[
-e
$proot
]
;
then
rm
-r
$proot
&&
echo
"-- Removed project
$proot
"
fi
if
[
-e
$aroot
]
;
then
rm
-r
$aroot
&&
echo
"-- Removed admin directory
$proot
"
if
[
!
"
$1
"
=
"upgrade"
]
;
then
echo
""
echo
-n
"Do you want to remove project and users (y/n) [n] "
read
remove_all
if
[
"
$remove_all
"
=
"y"
]
;
then
for
user
in
pwrp skiftel b55 b66
;
do
getent passwd
${
user
}
>
/dev/null 2>&1
&&
userdel
-rf
${
user
}
2>/dev/null
echo
"-- Removed user
${
user
}
"
done
for
grp
in
pwrp skiftel b55 b66
;
do
getent group
${
grp
}
>
/dev/null 2>&1
&&
groupdel
${
grp
}
echo
"-- Removed group
${
grp
}
"
done
echo
"-- Removing projects..."
if
[
-e
$proot
]
;
then
rm
-r
$proot
&&
echo
"-- Removed project
$proot
"
fi
if
[
-e
$aroot
]
;
then
rm
-r
$aroot
&&
echo
"-- Removed admin directory
$aroot
"
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
export pwr_lis=$pwrb_root/lis
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
for dir in `ls -1 /pwrp`; do
[[ "${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