summarylogtreecommitdiffstats
path: root/linux-preserve-modules.script
blob: 88e4a0b91c975379374fc064b3ce61791ade45ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

KERNEL="$(uname -r)"
TARGET="usr/lib/modules/$KERNEL"
PRESERVE_MODULES_DIR=/run/linux-preserve-modules

if grep -F -q "$TARGET"; then
    linux-preserve-modules unlink
    linux-preserve-modules copy
else
    echo "info: nothing to copy" >&2
    exit 0
fi