mail archive of the rauc mailing list
 help / color / mirror / Atom feed
From: Enrico Joerns <ejo@pengutronix.de>
To: Kevin Chen <chenxlbr@gmail.com>
Cc: rauc@pengutronix.de
Subject: Re: [RAUC] custom install handler can not execute
Date: Mon, 18 Dec 2017 10:56:16 +0100	[thread overview]
Message-ID: <205be4e0-1ca0-c7f4-d3d5-28f1426c7674@pengutronix.de> (raw)
In-Reply-To: <CAEQuCVvXxa5BpsaCjUPX06SMnjMCN4cLaVzC2Tz+9Mx2ocUMUA@mail.gmail.com>

Hi Kevin,

On 12/16/2017 03:19 PM, Kevin Chen wrote:
> Hi everyone,
> 
> I use RAUC on my iMX6 platform. I added handler config option in
> /etc/rauc/system.conf file.
> 
> [handlers]
> pre-install=/preinstall
> install=/install
> 
> The preinstall and install are shell script file.Then I install bundle
> test it.The preinstall has been executed.While the install handler
> doesn't execute.And I got the message on below when using debug
> option.
> 
> Starting pre install handler: /preinstall
> rauc-Message: installing /media/update-bundle.raucb:  80% Determining
> target install group done.
> # system preinstall handler
> # 1 2 3 4 5
> Using default handler
> rauc-Message: Marking target slot as non-bootable...
> 
> The rauc use default handler not mine.Did I miss something?

if I understand you correctly, you intend to replace the entire default 
installation handler of RAUC? I.e. you only want to use the signature 
verification and slot detection of RAUC, but not let it execute its 
bootloader interaction, image installation routines, etc? Right?

Would be great if could give a rough sketch of your setup / handling to 
understand what is you use case. We gave this option to RAUC users, but 
strongly discourage from using it for default stuff, because you will 
lose 80% of the benefits RAUC normally provides you.

Now, to make a long story short:

There is no `install` key in [handlers] section of system.conf (see 
[1]). Valid items are `system-info`, `pre-install` and `post-install`. 
These are handlers that are meant to be executed during *default* 
installation process.

The way to replace the entire installation procedure cannot (by 
intention) be configured from the system (as it is meant to be used only 
for temporary fixups, etc.) but only from the Bundle manifest instead. 
Here it will be chosen by providing a 'handler' section with an 
appropriate filename an optional args (see [2]):

   [handler]
   filename=myhandler.sh

This will replace the entire default bootloader and slot installation 
handling with calling your script!

Note that there is also the possibility to execute slot-specific install 
hooks. I.e. a hook that handles the installation process for a single 
slot only instead of replacing the entire installation handling with a 
custom script.


Best regards

Enrico


[1] 
http://rauc.readthedocs.io/en/latest/reference.html#system-configuration-file
[2] http://rauc.readthedocs.io/en/latest/reference.html#manifest


-- 
Pengutronix e.K.                           | Enrico Jörns                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
RAUC mailing list

      reply	other threads:[~2017-12-18  9:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-16 14:19 Kevin Chen
2017-12-18  9:56 ` Enrico Joerns [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=205be4e0-1ca0-c7f4-d3d5-28f1426c7674@pengutronix.de \
    --to=ejo@pengutronix.de \
    --cc=chenxlbr@gmail.com \
    --cc=rauc@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox