Jan Kundrát | 1cfb198 | 2017-10-30 18:05:47 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | case "$1" in |
| 4 | slot-post-install) |
| 5 | case "$RAUC_SLOT_CLASS" in |
| 6 | cfg) |
Jan Kundrát | 6b05a1d | 2019-03-06 17:01:28 +0100 | [diff] [blame] | 7 | for DIR in etc random-seed ssh-user-auth; do |
Jan Kundrát | 2af054a | 2018-06-06 13:45:04 +0200 | [diff] [blame] | 8 | if [[ -d /cfg/$DIR ]]; then |
| 9 | cp -a /cfg/$DIR ${RAUC_SLOT_MOUNT_POINT}/ |
| 10 | fi |
| 11 | done |
Jan Kundrát | 1cfb198 | 2017-10-30 18:05:47 +0100 | [diff] [blame] | 12 | ;; |
| 13 | *) |
| 14 | echo "Internal error: hook mismatched" |
| 15 | exit 11 |
| 16 | esac |
| 17 | ;; |
| 18 | *) |
| 19 | echo "Internal error: unrecognized hook" |
| 20 | exit 11 |
| 21 | ;; |
| 22 | esac |
| 23 | |
| 24 | exit 0 |