blob: b6ace5c3945998dd6bf78a8a4a3e62b3555cf8b8 [file] [log] [blame]
Jan Kundrát1cfb1982017-10-30 18:05:47 +01001#!/bin/sh
2
3case "$1" in
4 slot-post-install)
5 case "$RAUC_SLOT_CLASS" in
6 cfg)
Jan Kundrát68f98ad2019-11-01 20:18:04 +01007 # whitelist so that we don't copy cruft or lost+found
8 for ITEM in \
9 etc \
Jan Kundrát1c6643e2019-11-01 19:39:34 +010010 journald-remote \
Jan Kundrát68f98ad2019-11-01 20:18:04 +010011 random-seed \
12 ssh-user-auth \
13 ; do
Jan Kundrát1c6643e2019-11-01 19:39:34 +010014 if [[ -d /cfg/${ITEM} || -f /cfg/${ITEM} ]]; then
Jan Kundrát68f98ad2019-11-01 20:18:04 +010015 cp -a /cfg/${ITEM} ${RAUC_SLOT_MOUNT_POINT}/
Jan Kundrát2af054a2018-06-06 13:45:04 +020016 fi
17 done
Jan Kundrát1cfb1982017-10-30 18:05:47 +010018 ;;
19 *)
20 echo "Internal error: hook mismatched"
21 exit 11
22 esac
23 ;;
24 *)
25 echo "Internal error: unrecognized hook"
26 exit 11
27 ;;
28esac
29
30exit 0