mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 05:21:58 +00:00
Merge pull request #130143 from saschagrunert/dmesg-root
Use `sudo` for dmesg in hack/local-up-cluster.sh
This commit is contained in:
commit
6487606f6e
@ -411,7 +411,7 @@ cleanup()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Cleanup dmesg running in the background
|
# Cleanup dmesg running in the background
|
||||||
[[ -n "${DMESG_PID-}" ]] && kill "$DMESG_PID"
|
[[ -n "${DMESG_PID-}" ]] && sudo kill "$DMESG_PID" 2>/dev/null
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
@ -812,8 +812,10 @@ function wait_coredns_available(){
|
|||||||
echo "6" | sudo tee /proc/sys/kernel/printk
|
echo "6" | sudo tee /proc/sys/kernel/printk
|
||||||
|
|
||||||
# loop through and grab all things in dmesg
|
# loop through and grab all things in dmesg
|
||||||
dmesg > "${LOG_DIR}/dmesg.log"
|
# shellcheck disable=SC2024
|
||||||
dmesg -w --human >> "${LOG_DIR}/dmesg.log" &
|
sudo dmesg > "${LOG_DIR}/dmesg.log"
|
||||||
|
# shellcheck disable=SC2024
|
||||||
|
sudo dmesg -w --human >> "${LOG_DIR}/dmesg.log" &
|
||||||
DMESG_PID=$!
|
DMESG_PID=$!
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user