diff options
author | root <root@rshg054.dnsready.net> | 2011-08-17 23:14:29 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-08-17 23:14:29 +0000 |
commit | 3413e75c9cdb6c0daf6ddf92f469a2221c94a55b (patch) | |
tree | ebc8d673526a7bcca4a4fcd6ed7872baec735f90 /extra/oprofile/oprofile.install | |
parent | 68b7938bb87c6e91d54e4f35f0223c7237fa53e1 (diff) |
Wed Aug 17 23:14:29 UTC 2011
Diffstat (limited to 'extra/oprofile/oprofile.install')
-rw-r--r-- | extra/oprofile/oprofile.install | 18 |
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 +} |