浏览代码

packaging, issue #1647: Add docker groupname on the package release

Daniel Mizyrycki 12 年之前
父节点
当前提交
dfd0deefbb
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      hack/make/ubuntu

+ 2 - 0
hack/make/ubuntu

@@ -51,11 +51,13 @@ bundle_ubuntu() {
 	cat >/tmp/postinstall <<EOF
 #!/bin/sh
 /sbin/stop docker || true
+/bin/grep -q "^docker:" /etc/group || /usr/sbin/addgroup --system docker || true
 /sbin/start docker
 EOF
 	cat >/tmp/prerm <<EOF
 #!/bin/sh
 /sbin/stop docker || true
+/usr/sbin/delgroup docker || true
 EOF
 	chmod +x /tmp/postinstall /tmp/prerm