summaryrefslogtreecommitdiff
path: root/extra/oprofile/oprofile.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-09-07 15:14:25 +0000
committerroot <root@rshg054.dnsready.net>2011-09-07 15:14:25 +0000
commit52442b30a60f3a0dc7bc0eb214d123d001987c83 (patch)
treeb4ba9af92ba3a77331f71b19dd46fb3964e79c19 /extra/oprofile/oprofile.install
parent17f3e93f2d2e9d6b429c34a2c107ee4d0b7b3973 (diff)
Wed Sep 7 15:14:25 UTC 2011
Diffstat (limited to 'extra/oprofile/oprofile.install')
-rw-r--r--extra/oprofile/oprofile.install7
1 files changed, 5 insertions, 2 deletions
diff --git a/extra/oprofile/oprofile.install b/extra/oprofile/oprofile.install
index 025c9725a..5cd3e7e22 100644
--- a/extra/oprofile/oprofile.install
+++ b/extra/oprofile/oprofile.install
@@ -1,11 +1,14 @@
post_install(){
groupadd -g 492 oprofile &>/dev/null
- useradd -u 492 -g oprofile -s /bin/false oprofile &>/dev/null
+ useradd -u 492 -g oprofile -d /var/lib/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
+ getent passwd oprofile >/dev/null 2>&1 || useradd -u 492 -g oprofile -d /var/lib/oprofile -s /bin/false oprofile &>/dev/null
+ if [ "$(vercmp $2 0.9.7-2)" -lt 0 ] ; then
+ usermod -d /var/lib/oprofile oprofile
+ fi
}
post_remove(){