net-snmp: inherit useradd to add user and group 25/3525/1
authorJackie Huang <jackie.huang@windriver.com>
Wed, 29 Apr 2020 01:49:45 +0000 (09:49 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Wed, 29 Apr 2020 01:52:40 +0000 (09:52 +0800)
inherit useradd bbclass to add user and group 'snmpd' which is
required by stx 3.0

Issue-ID: INF-56
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: I0c390a178951544c781fde0e89d11f26434550ec

meta-stx/recipes-networking/net-snmp/net-snmp_%.bbappend [new file with mode: 0644]

diff --git a/meta-stx/recipes-networking/net-snmp/net-snmp_%.bbappend b/meta-stx/recipes-networking/net-snmp/net-snmp_%.bbappend
new file mode 100644 (file)
index 0000000..6ef67f5
--- /dev/null
@@ -0,0 +1,20 @@
+#
+## Copyright (C) 2019 Wind River Systems, Inc.
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+inherit useradd
+
+USERADD_PACKAGES = "net-snmp-server-snmpd"
+USERADD_PARAM_net-snmp-server-snmpd = "-r -g snmpd -u 169 -d /usr/share/snmp -s /sbin/nologin -c 'net-snmp' snmpd"
+GROUPADD_PARAM_net-snmp-server-snmpd = "-r -g 169 snmpd"