mail archive of the rauc mailing list
 help / color / mirror / Atom feed
* [RAUC] custom install handler can not execute
@ 2017-12-16 14:19 Kevin Chen
  2017-12-18  9:56 ` Enrico Joerns
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Chen @ 2017-12-16 14:19 UTC (permalink / raw)
  To: rauc

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?
-- 

---
Kevin Chen
ShenZhen Guangdong, China

_______________________________________________
RAUC mailing list

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

* Re: [RAUC] custom install handler can not execute
  2017-12-16 14:19 [RAUC] custom install handler can not execute Kevin Chen
@ 2017-12-18  9:56 ` Enrico Joerns
  0 siblings, 0 replies; 2+ messages in thread
From: Enrico Joerns @ 2017-12-18  9:56 UTC (permalink / raw)
  To: Kevin Chen; +Cc: rauc

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

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

end of thread, other threads:[~2017-12-18  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-16 14:19 [RAUC] custom install handler can not execute Kevin Chen
2017-12-18  9:56 ` Enrico Joerns

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox