2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-06-16 08:30:49 +00:00

Move handling of the loop directio straight to onboot

There were difficulties in the devfs after
boot, just let the full system handle it.
This commit is contained in:
Jarrod Johnson
2025-11-13 15:33:04 -05:00
parent 4484216198
commit d20c5ac6eb
5 changed files with 8 additions and 3 deletions
@@ -169,7 +169,6 @@ if [ $TETHERED -eq 1 ]; then
mkdir -p /run/confluent
echo $ONBOOTPID > /run/confluent/onboot_sleep.pid
wait $ONBOOTPID
losetup /sysroot/$loopdev --direct-io=on
dd if=/mnt/remoteimg/rootimg.sfs iflag=nocache count=0 >& /dev/null
rm -rf /lib/modules/$(uname -r) /lib/modules/$(uname -r)-ramfs /lib/firmware-ramfs /usr/lib64/libcrypto.so* /usr/lib64/systemd/ /kernel/ /usr/bin/ /usr/sbin/ /usr/libexec/
) &
@@ -139,7 +139,6 @@ if [ $TETHERED -eq 1 ]; then
mkdir -p /run/confluent
echo $ONBOOTPID > /run/confluent/onboot_sleep.pid
wait $ONBOOTPID
losetup $loopdev --direct-io=on
dd if=/mnt/remoteimg/rootimg.sfs iflag=nocache count=0 >& /dev/null
) &
while [ ! -f /run/confluent/onboot_sleep.pid ]; do
@@ -69,6 +69,10 @@ run_remote_parts onboot.d
run_remote_config onboot.d
if [ -f /run/confluent/onboot_sleep.pid ]; then
loopdev=$(losetup -j /mnt/remoteimg/rootimg.sfs|cut -d: -f 1)
if [ -n "$loopdev" ]; then
losetup "$loopdev" --direct-io=on
fi
sleeppid=$(cat /run/confluent/onboot_sleep.pid)
kill "$sleeppid"
rm -f /run/confluent/onboot_sleep.pid
@@ -180,7 +180,6 @@ if [ $TETHERED -eq 1 ]; then
mkdir -p /run/confluent
echo $ONBOOTPID > /run/confluent/onboot_sleep.pid
wait $ONBOOTPID
losetup /sysroot/$loopdev --direct-io=on
dd if=/mnt/remoteimg/rootimg.sfs iflag=nocache count=0 >& /dev/null
if [ $debugssh -eq 0 ]; then
rm -rf /lib/modules/$(uname -r) /lib/modules/$(uname -r)-ramfs /lib/firmware-ramfs /usr/lib64/libcrypto.so* /usr/lib64/systemd/ /kernel/ /usr/bin/ /usr/sbin/ /usr/libexec/
@@ -63,6 +63,10 @@ run_remote_parts onboot.d
run_remote_config onboot.d
if [ -f /run/confluent/onboot_sleep.pid ]; then
loopdev=$(losetup -j /mnt/remoteimg/rootimg.sfs|cut -d: -f 1)
if [ -n "$loopdev" ]; then
losetup "$loopdev" --direct-io=on
fi
sleeppid=$(cat /run/confluent/onboot_sleep.pid)
kill "$sleeppid"
rm -f /run/confluent/onboot_sleep.pid