From 3413e75c9cdb6c0daf6ddf92f469a2221c94a55b Mon Sep 17 00:00:00 2001 From: root Date: Wed, 17 Aug 2011 23:14:29 +0000 Subject: Wed Aug 17 23:14:29 UTC 2011 --- extra/oprofile/oprofile.install | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 extra/oprofile/oprofile.install (limited to 'extra/oprofile/oprofile.install') 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 +} -- cgit v1.2.3-54-g00ecf