summaryrefslogtreecommitdiffstats
path: root/abs/extra/nbd/nbd.install
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-08-07 20:35:37 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-08-07 20:35:37 (GMT)
commitc16d87c6431130c7ef4081ced7372ebbf1c83ad5 (patch)
tree111b28bd625d2771885fe18269550b3364667d96 /abs/extra/nbd/nbd.install
parent2194e3567f7560cfbbe986444f0fc8cc4683922c (diff)
downloadlinhes_pkgbuild-c16d87c6431130c7ef4081ced7372ebbf1c83ad5.zip
linhes_pkgbuild-c16d87c6431130c7ef4081ced7372ebbf1c83ad5.tar.gz
linhes_pkgbuild-c16d87c6431130c7ef4081ced7372ebbf1c83ad5.tar.bz2
nbd: 3.2
Diffstat (limited to 'abs/extra/nbd/nbd.install')
-rw-r--r--abs/extra/nbd/nbd.install13
1 files changed, 13 insertions, 0 deletions
diff --git a/abs/extra/nbd/nbd.install b/abs/extra/nbd/nbd.install
new file mode 100644
index 0000000..9e7a01e
--- /dev/null
+++ b/abs/extra/nbd/nbd.install
@@ -0,0 +1,13 @@
+post_install() {
+ getent group "nbd" &>/dev/null || groupadd -r -g 44 nbd 1>/dev/null
+ getent passwd "nbd" &>/dev/null || useradd -r -u 44 -g nbd -d "/var/empty" -s "/bin/false" nbd 1>/dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ getent passwd "nbd" &>/dev/null && userdel nbd 1>/dev/null
+ getent group "nbd" &>/dev/null && groupdel nbd 1>/dev/null
+}