Do not save /etc/kernel/cmdline when in chroot
This commit is contained in:
parent
5c7c10f624
commit
74cd1e57ea
1 changed files with 6 additions and 0 deletions
|
@ -7,6 +7,12 @@ while read -r line; do
|
||||||
kernel-install $1 "${version}" "${line}"
|
kernel-install $1 "${version}" "${line}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# first check if we are running in a chroot
|
||||||
|
if [ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ]; then
|
||||||
|
echo 'Running in a chroot, skipping cmdline generation'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# If needed, set /etc/kernel/cmdline to enable kernel-install in a chroot
|
# If needed, set /etc/kernel/cmdline to enable kernel-install in a chroot
|
||||||
if [[ ! -e /etc/kernel/cmdline ]]; then
|
if [[ ! -e /etc/kernel/cmdline ]]; then
|
||||||
mkdir -p /etc/kernel
|
mkdir -p /etc/kernel
|
||||||
|
|
Loading…
Add table
Reference in a new issue