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 | 68f98ad | 2019-11-01 20:18:04 +0100 | [diff] [blame] | 7 | # whitelist so that we don't copy cruft or lost+found |
| 8 | for ITEM in \ |
| 9 | etc \ |
Jan Kundrát | 1c6643e | 2019-11-01 19:39:34 +0100 | [diff] [blame] | 10 | journald-remote \ |
Jan Kundrát | 68f98ad | 2019-11-01 20:18:04 +0100 | [diff] [blame] | 11 | random-seed \ |
| 12 | ssh-user-auth \ |
| 13 | ; do |
Jan Kundrát | 1c6643e | 2019-11-01 19:39:34 +0100 | [diff] [blame] | 14 | if [[ -d /cfg/${ITEM} || -f /cfg/${ITEM} ]]; then |
Jan Kundrát | 68f98ad | 2019-11-01 20:18:04 +0100 | [diff] [blame] | 15 | cp -a /cfg/${ITEM} ${RAUC_SLOT_MOUNT_POINT}/ |
Jan Kundrát | 2af054a | 2018-06-06 13:45:04 +0200 | [diff] [blame] | 16 | fi |
| 17 | done |
Jan Kundrát | 1cfb198 | 2017-10-30 18:05:47 +0100 | [diff] [blame] | 18 | ;; |
| 19 | *) |
| 20 | echo "Internal error: hook mismatched" |
| 21 | exit 11 |
| 22 | esac |
| 23 | ;; |
| 24 | *) |
| 25 | echo "Internal error: unrecognized hook" |
| 26 | exit 11 |
| 27 | ;; |
| 28 | esac |
| 29 | |
| 30 | exit 0 |