summaryrefslogtreecommitdiff
path: root/extra/oprofile/oprofile.install
diff options
context:
space:
mode:
Diffstat (limited to 'extra/oprofile/oprofile.install')
-rw-r--r--extra/oprofile/oprofile.install18
1 files changed, 18 insertions, 0 deletions
diff --git a/extra/oprofile/oprofile.install b/extra/oprofile/oprofile.install
new file mode 100644
index 000000000..025c9725a
--- /dev/null
+++ b/extra/oprofile/oprofile.install
@@ -0,0 +1,18 @@
+post_install(){
+ groupadd -g 492 oprofile &>/dev/null
+ useradd -u 492 -g oprofile -s /bin/false oprofile &>/dev/null
+}
+
+post_upgrade(){
+ getent group oprofile >/dev/null 2>&1 || groupadd -g 492 oprofile &>/dev/null
+ getent passwd oprofile >/dev/null 2>&1 || useradd -u 492 -g oprofile -s /bin/false oprofile &>/dev/null
+}
+
+post_remove(){
+ if getent passwd oprofile >/dev/null 2>&1; then
+ userdel oprofile
+ fi
+ if getent group oprofile >/dev/null 2>&1; then
+ groupdel oprofile
+ fi
+}