mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
appliance: Create /dev/loop-control and similar devices.
When 'mount -o loop' and similar commands are used, the loop module is loaded automatically by the kernel when /dev/loop-control is accessed. /dev/loop-control is created semi-statically by an unholy and overcomplex combination of kmod static-nodes and systemd-tmpfiles (instead of using, say, just udev or even just a simple series of mknod commands).
This commit is contained in:
@@ -83,6 +83,13 @@ if grep -sq selinux=1 /proc/cmdline; then
|
||||
mount -t selinuxfs none /sys/fs/selinux
|
||||
fi
|
||||
|
||||
# Set up kmod static-nodes (RHBZ#1011907).
|
||||
mkdir -p /run/tmpfiles.d
|
||||
kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
|
||||
|
||||
# Set up tmpfiles (must run after kmod.conf is created above).
|
||||
systemd-tmpfiles --prefix=/dev --create
|
||||
|
||||
# Disk optimizations.
|
||||
# Increase the SCSI timeout so we can read remote images.
|
||||
for f in /sys/block/sd*/device/timeout; do echo 300 > $f; done
|
||||
|
||||
Reference in New Issue
Block a user