* run commands after installation
@ 2013-06-26 14:32 Katu Txakur
2013-06-26 15:37 ` Tomas Frydrych
0 siblings, 1 reply; 5+ messages in thread
From: Katu Txakur @ 2013-06-26 14:32 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
Hi,
I want to create a user after adding the snmp recipe. The command to do
that is:
net-snmp-config --create-snmpv3-user -a "my_password" myuser
What's the best way to do it? I have tried from do_install_append and also
from ROOTFS_POSTPROCESS_COMMAND but no luck so far.
Thanks
[-- Attachment #2: Type: text/html, Size: 529 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: run commands after installation
2013-06-26 14:32 run commands after installation Katu Txakur
@ 2013-06-26 15:37 ` Tomas Frydrych
2013-06-27 6:38 ` Gaurang Shastri
2013-06-27 9:37 ` Katu Txakur
0 siblings, 2 replies; 5+ messages in thread
From: Tomas Frydrych @ 2013-06-26 15:37 UTC (permalink / raw)
To: yocto
On 26/06/13 15:32, Katu Txakur wrote:
> I want to create a user after adding the snmp recipe. The command to do
> that is:
>
> net-snmp-config --create-snmpv3-user -a "my_password" myuser
>
> What's the best way to do it? I have tried from do_install_append and
> also from ROOTFS_POSTPROCESS_COMMAND but no luck so far.
You need a postinst script for that sort of a thing.
Tomas
--
http://sleepfive.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: run commands after installation
2013-06-26 15:37 ` Tomas Frydrych
@ 2013-06-27 6:38 ` Gaurang Shastri
2013-06-27 7:16 ` Nicolas Dechesne
2013-06-27 9:37 ` Katu Txakur
1 sibling, 1 reply; 5+ messages in thread
From: Gaurang Shastri @ 2013-06-27 6:38 UTC (permalink / raw)
To: Tomas Frydrych; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]
Hi,
You need to do something like below:
pkg_postinst() {
net-snmp-config --create-snmpv3-user -a "my_password" myuser
}
try with above and it should work :)
//Gaurang Shastri
On Wed, Jun 26, 2013 at 9:07 PM, Tomas Frydrych <tf+lists.yocto@r-finger.com
> wrote:
> On 26/06/13 15:32, Katu Txakur wrote:
> > I want to create a user after adding the snmp recipe. The command to do
> > that is:
> >
> > net-snmp-config --create-snmpv3-user -a "my_password" myuser
> >
> > What's the best way to do it? I have tried from do_install_append and
> > also from ROOTFS_POSTPROCESS_COMMAND but no luck so far.
>
> You need a postinst script for that sort of a thing.
>
> Tomas
>
> --
> http://sleepfive.com
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
[-- Attachment #2: Type: text/html, Size: 1644 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: run commands after installation
2013-06-27 6:38 ` Gaurang Shastri
@ 2013-06-27 7:16 ` Nicolas Dechesne
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Dechesne @ 2013-06-27 7:16 UTC (permalink / raw)
To: Gaurang Shastri; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 583 bytes --]
On Thu, Jun 27, 2013 at 8:38 AM, Gaurang Shastri <gmshastri@gmail.com>wrote:
> Hi,
>
> You need to do something like below:
>
> pkg_postinst() {
>
> net-snmp-config --create-snmpv3-user -a "my_password" myuser
> }
>
> try with above and it should work :)
>
note it should be
pkg_postinst_PACKAGENAME(), so in most cases: pkg_postinst_${PN}()
also, see:
http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#post-installation-scripts
http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#usingpoky-extend-addpkg-postinstalls
[-- Attachment #2: Type: text/html, Size: 1492 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: run commands after installation
2013-06-26 15:37 ` Tomas Frydrych
2013-06-27 6:38 ` Gaurang Shastri
@ 2013-06-27 9:37 ` Katu Txakur
1 sibling, 0 replies; 5+ messages in thread
From: Katu Txakur @ 2013-06-27 9:37 UTC (permalink / raw)
To: Tomas Frydrych; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 813 bytes --]
Thanks Tomas, it was as easy as
pkg_postinst_${PN} () {
#!/bin/sh -e
net-snmp-config --create-snmpv3-user -a "my_password" myuser
}
2013/6/26 Tomas Frydrych <tf+lists.yocto@r-finger.com>
> On 26/06/13 15:32, Katu Txakur wrote:
> > I want to create a user after adding the snmp recipe. The command to do
> > that is:
> >
> > net-snmp-config --create-snmpv3-user -a "my_password" myuser
> >
> > What's the best way to do it? I have tried from do_install_append and
> > also from ROOTFS_POSTPROCESS_COMMAND but no luck so far.
>
> You need a postinst script for that sort of a thing.
>
> Tomas
>
> --
> http://sleepfive.com
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
[-- Attachment #2: Type: text/html, Size: 1553 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-27 9:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-26 14:32 run commands after installation Katu Txakur
2013-06-26 15:37 ` Tomas Frydrych
2013-06-27 6:38 ` Gaurang Shastri
2013-06-27 7:16 ` Nicolas Dechesne
2013-06-27 9:37 ` Katu Txakur
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.