AlBo
December 15, 2017, 3:00pm
1
Hi,
I’ve included the following rule in my do_install task:
install -o technicien -m 0500 ${WORKDIR}/scripts/generate_config.sh ${D}${sbindir}/
install -o blackbox -g configuration -m 0660 ${WORKDIR}/config.json ${D}${sysconfdir}/
The files are in the specified directories and have the good rights but doesn’t own to the good owner:group
generate_config.sh
owns to root:appsecSt
config.json
owns to appfwupd:appfwupd
What is the problem please?
Alain
CoRfr
December 16, 2017, 1:28am
2
Could you look at the user & group ids using ls -n
?
Does the technicien/blackbox users and configuration group exist on the target?
AlBo
December 20, 2017, 7:38am
3
@ CoRfr,
No, the users and group don’t exist.
In fact I can see the users in /etc/shadow
but not in /etc/passwd
.
I can see them in /home/xool/yocto/build_bin/tmp/work/swi_mdm9x15-poky-linux-gnueabi/mdm9x15-image-minimal/1.0-r0.0/rootfs/etc/passwd
but not on the target.
My bb file is that one:
inherit useradd
USERADD_PACKAGES = "${PN}"
GROUPADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "configuration"
USERADD_PARAM_${PN} = "-d /tmp -G configuration blackbox; -m -d /tmp -s /usr/sbin/generate_config.sh -G configuration -p wtmoOHy.mTsUk technicien"
...
do_install() {
install -o technicien -m 0500 ${WORKDIR}/scripts/generate_config.sh ${D}${sbindir}/
}
According to the example I found here , I think it’s ok but maybe I made a mistake.
I can see a preinst
script in blackbox_1.0-r0_arm-vfp-neon.ipk
in armv7a-vfp-neon
folder, nothing in swi-mdm9x15
is it normal?
EDIT: But according to the example pointed out above, it uses chgrp so does useradd -G
works?
Alain