mirror of
https://github.com/systemd/systemd.git
synced 2025-01-03 05:18:09 +03:00
test: add fstab file support for fstab-generator tests
This commit is contained in:
parent
905dd992f8
commit
ef0c7ab6ac
@ -26,7 +26,11 @@ for f in "$src"/test-*.input; do
|
||||
trap "rm -rf '$out'" EXIT INT QUIT PIPE
|
||||
|
||||
# shellcheck disable=SC2046
|
||||
if [[ "$f" == *.fstab.input ]]; then
|
||||
SYSTEMD_LOG_LEVEL=debug SYSTEMD_IN_INITRD=yes SYSTEMD_SYSFS_CHECK=no SYSTEMD_PROC_CMDLINE="fstab=yes root=fstab" SYSTEMD_FSTAB="$f" SYSTEMD_SYSROOT_FSTAB="/dev/null" $generator "$out" "$out" "$out"
|
||||
else
|
||||
SYSTEMD_LOG_LEVEL=debug SYSTEMD_IN_INITRD=yes SYSTEMD_PROC_CMDLINE="fstab=no $(cat "$f")" $generator "$out" "$out" "$out"
|
||||
fi
|
||||
|
||||
if [[ -f "$out"/systemd-fsck-root.service ]]; then
|
||||
# For split-usr system
|
||||
|
@ -0,0 +1,5 @@
|
||||
# Automatically generated by systemd-fstab-generator
|
||||
|
||||
[Unit]
|
||||
Requires=dev-sdx1.device
|
||||
After=dev-sdx1.device
|
@ -0,0 +1,11 @@
|
||||
# Automatically generated by systemd-fstab-generator
|
||||
|
||||
[Unit]
|
||||
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
|
||||
SourcePath=/etc/fstab
|
||||
Before=initrd-fs.target
|
||||
|
||||
[Mount]
|
||||
What=/sysusr/usr
|
||||
Where=/sysroot/usr
|
||||
Options=bind
|
@ -0,0 +1,13 @@
|
||||
# Automatically generated by systemd-fstab-generator
|
||||
|
||||
[Unit]
|
||||
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
|
||||
SourcePath=/etc/fstab
|
||||
Before=initrd-root-fs.target
|
||||
Requires=systemd-fsck-root.service
|
||||
After=systemd-fsck-root.service
|
||||
After=blockdev@dev-sdx1.target
|
||||
|
||||
[Mount]
|
||||
What=/dev/sdx1
|
||||
Where=/sysroot
|
@ -0,0 +1,16 @@
|
||||
# Automatically generated by systemd-fstab-generator
|
||||
|
||||
[Unit]
|
||||
Description=File System Check on /dev/sdx1
|
||||
Documentation=man:systemd-fsck-root.service(8)
|
||||
DefaultDependencies=no
|
||||
BindsTo=dev-sdx1.device
|
||||
Conflicts=shutdown.target
|
||||
After=initrd-root-device.target local-fs-pre.target dev-sdx1.device
|
||||
Before=shutdown.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/lib/systemd/systemd-fsck /dev/sdx1
|
||||
TimeoutSec=0
|
@ -0,0 +1,11 @@
|
||||
# Automatically generated by systemd-fstab-generator
|
||||
|
||||
[Unit]
|
||||
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
|
||||
SourcePath=/etc/fstab
|
||||
Before=initrd-usr-fs.target
|
||||
After=blockdev@dev-sdx2.target
|
||||
|
||||
[Mount]
|
||||
What=/dev/sdx2
|
||||
Where=/sysusr/usr
|
@ -0,0 +1,2 @@
|
||||
/dev/sdx1 /sysroot auto defaults 0 1
|
||||
/dev/sdx2 /sysroot/usr auto defaults 0 0
|
Loading…
Reference in New Issue
Block a user