All of lore.kernel.org
 help / color / mirror / Atom feed
* Create dir with 700 permissions from recipe
@ 2009-08-18 13:52 s hakkesteegt
  2009-08-18 14:12 ` Graeme Gregory
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: s hakkesteegt @ 2009-08-18 13:52 UTC (permalink / raw)
  To: openembedded-devel

Hi,

For a recipe I want to use locally to enable public key authentication on my
images, I'm trying to create the .ssh dir with 700 permissions. But this
doesn't seem to work. It ends up in the rootfs and in the ipk with 775
permissions, although in the work dir it has the correct 700 permissions.
This is the recipe I created:


SRC_URI=" \
                    file://authorized_keys \
       "

FILES_${PN}=" /home/root/.ssh \
                       /home/root/.ssh/authorized_keys \
           "

do_install(){
       install -m 0700 -d ${D}/home/root/.ssh
       install -m 0600 ${WORKDIR}/authorized_keys
${D}/home/root/.ssh/authorized_keys
}


On irc was suggested to use postinst script. So I tried to add the next at
the end of the recipe.:


pkg_postinst_${PN}-chmodsshdir () {
        chmod 700 /home/root/.ssh
}


1. Do I understand it correct that this postinst script will run on the
target machine (after first boot)? Or is that wrong?

2. This doesn't seem to work either. Am I doing something wrong and is there
a better / right way to add my public key my created images.


Thanks in advance for a reaction,

Siebren


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-08-20  3:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-18 13:52 Create dir with 700 permissions from recipe s hakkesteegt
2009-08-18 14:12 ` Graeme Gregory
2009-08-18 14:40   ` Phil Blundell
2009-08-19  8:55   ` s hakkesteegt
2009-08-19 12:00     ` Michael Smith
2009-08-18 14:17 ` Koen Kooi
2009-08-19  6:58   ` s hakkesteegt
2009-08-19 12:19     ` marcin
2009-08-20  3:40       ` Denys Dmytriyenko
2009-08-18 14:33 ` Michael Smith

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.