25 lines
661 B
Bash
25 lines
661 B
Bash
function debsquash {
|
|
boot_toram='true'
|
|
lmp="${1}"
|
|
sfs="filesystem.squashfs"
|
|
if [ -f "(${data})${lmp}/vmlinuz" ]; then
|
|
linux_path="(${data})${lmp}/vmlinuz"
|
|
initrd_path="(${data})${lmp}/initrd.img"
|
|
else
|
|
linux_path="(squash)/vmlinuz"
|
|
initrd_path="(squash)/initrd.img"
|
|
loopback "squash" "${lmp}/${sfs}"
|
|
fi
|
|
boot_linux="linux \
|
|
\"${linux_path}\" \
|
|
boot=\"live\" \
|
|
elevator=\"deadline\" \
|
|
ip=\"frommedia\" \
|
|
live-media-path=\"${lmp}\" \
|
|
toram"
|
|
if [ "${boot_toram}" == "true" ]; then
|
|
boot_linux="${boot_linux}=\"${sfs}\""
|
|
fi
|
|
echo_eval "${boot_linux}"
|
|
initrd "${initrd_path}"
|
|
}
|