You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
6 months ago | |
|---|---|---|
| .. | ||
| README.md | 6 months ago | |
| backup-mnt-test.service | 6 months ago | |
| common.env | 6 months ago | |
| custom.target | 6 months ago | |
| install.sh | 6 months ago | |
| mnt-backup.mount | 6 months ago | |
| mnt-test.mount | 6 months ago | |
| restore-mnt-test.service | 6 months ago | |
| test.sh | 6 months ago | |
README.md
Execute a unit before and after another one
Use case
In this example, I wanted to mount a file system (/mnt/test). But before mounting the filesystem, I wanted to make a backup of it. And after, I want to restore the filesystem from the previous backup. In addition to that, the backup is stored on another filesystem that needs to be mounted too.
Install
./install.sh
Test
./test.sh
cat /mnt/test/witness