Fix type=user VMs
This commit is contained in:
parent
fb9ffa53bb
commit
15cd06f4d6
1 changed files with 6 additions and 4 deletions
|
|
@ -22,6 +22,8 @@ mac="$(ip link | grep -A1 -m1 "macvtap-" | \
|
||||||
sed -nE "s%\s+link/ether ([[:xdigit:]:]{17}) .+%\1%p")"
|
sed -nE "s%\s+link/ether ([[:xdigit:]:]{17}) .+%\1%p")"
|
||||||
tapdev="$(ip link | grep -A1 -m1 "macvtap-" | sed -nE "s%^[1-9]:\s(\S+)@.*%\1%p")"
|
tapdev="$(ip link | grep -A1 -m1 "macvtap-" | sed -nE "s%^[1-9]:\s(\S+)@.*%\1%p")"
|
||||||
|
|
||||||
|
livebox=$(host livebox | sed -E "s/.+ ([0-9.]+)$/\1/")
|
||||||
|
|
||||||
if [[ $# -eq 0 ]] ; then
|
if [[ $# -eq 0 ]] ; then
|
||||||
mem=$(sed -En "s/^MemAvailable:\s+([0-9]+)\s+kB/\1/p" /proc/meminfo)
|
mem=$(sed -En "s/^MemAvailable:\s+([0-9]+)\s+kB/\1/p" /proc/meminfo)
|
||||||
cpu=$(sed -En "0,/^cpu cores/s/^cpu cores\s+:\s+([0-9]+)/\1/p" /proc/cpuinfo)
|
cpu=$(sed -En "0,/^cpu cores/s/^cpu cores\s+:\s+([0-9]+)/\1/p" /proc/cpuinfo)
|
||||||
|
|
@ -31,8 +33,8 @@ else
|
||||||
arg=("$@")
|
arg=("$@")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
kernel="http://livebox/d-i/n-live/${img%-ram}/live/vmlinuz"
|
kernel="http://${livebox}/d-i/n-live/${img%-ram}/live/vmlinuz"
|
||||||
initrd="http://livebox/d-i/n-live/${img%-ram}/live/initrd.img"
|
initrd="http://${livebox}/d-i/n-live/${img%-ram}/live/initrd.img"
|
||||||
kargs=(boot=live components splash locales=de_DE.UTF-8 keyboard-layouts=de
|
kargs=(boot=live components splash locales=de_DE.UTF-8 keyboard-layouts=de
|
||||||
swap=true live-config.timezone=Europe/Berlin)
|
swap=true live-config.timezone=Europe/Berlin)
|
||||||
|
|
||||||
|
|
@ -42,10 +44,10 @@ case "$img" in
|
||||||
kargs+=(console=ttyS0)
|
kargs+=(console=ttyS0)
|
||||||
;;&
|
;;&
|
||||||
*-ram)
|
*-ram)
|
||||||
kargs+=("root=live:nfs4:livebox:/images/${img%-ram}/live/filesystem.squashfs rd.live.ram=1")
|
kargs+=("root=live:nfs4:${livebox}:/images/${img%-ram}/live/filesystem.squashfs rd.live.ram=1")
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
kargs+=("root=live:nfs4:livebox:/images/${img%-ram}/live/filesystem.squashfs")
|
kargs+=("root=live:nfs4:${livebox}:/images/${img%-ram}/live/filesystem.squashfs")
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue