diff options
Diffstat (limited to '10-linux-modules-post.hook')
-rw-r--r-- | 10-linux-modules-post.hook | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/10-linux-modules-post.hook b/10-linux-modules-post.hook new file mode 100644 index 000000000000..b4d15d1ae8ce --- /dev/null +++ b/10-linux-modules-post.hook @@ -0,0 +1,14 @@ +[Trigger] +Operation = Upgrade +Type = Package +Target = linux +Target = linux-hardened +Target = linux-lts +Target = linux-zen + +[Action] +Description = Restore Linux kernel modules +When = PostTransaction +Depends = coreutils +Depends = rsync +Exec = /bin/sh -xc 'KVER="${KVER:-$(uname -r)}"; if test -e "/lib/modules/backup/${KVER}"; then rsync -AHXal --ignore-existing "/lib/modules/backup/${KVER}" /lib/modules/; fi; rm -rf /lib/modules/backup' |