190 |
local i |
local i |
191 |
local hwtmp |
local hwtmp |
192 |
|
|
193 |
if [ -x $(which mktemp &> /dev/null) ] |
if [ -x $(type -P mktemp) ] |
194 |
then |
then |
195 |
hwtmp="$(mktemp)" |
hwtmp="$(mktemp)" |
196 |
else |
else |
659 |
sed -i "s:^\(export GRUB_CMDLINE_LINUX_DEFAULT=\).*:\1\"${KERNELOPTS}\":" ${INSTALL_ROOT}/etc/conf.d/grub || die |
sed -i "s:^\(export GRUB_CMDLINE_LINUX_DEFAULT=\).*:\1\"${KERNELOPTS}\":" ${INSTALL_ROOT}/etc/conf.d/grub || die |
660 |
sed -i "s:^\(export GRUB_GFXPAYLOAD_LINUX=\).*:\1\"${GRUB2GFXPAYLOAD}\":" ${INSTALL_ROOT}/etc/conf.d/grub || die |
sed -i "s:^\(export GRUB_GFXPAYLOAD_LINUX=\).*:\1\"${GRUB2GFXPAYLOAD}\":" ${INSTALL_ROOT}/etc/conf.d/grub || die |
661 |
else |
else |
662 |
echo "export GRUB_CMDLINE_LINUX_DEFAULT=\"${KERNELOPTS}\"" > ${INSTALL_ROOT}/etc/conf.d/grub || die |
CONFIG=${INSTALL_ROOT}/etc/conf.d/grub |
663 |
echo "export GRUB_GFXPAYLOAD_LINUX=\"${GRUB2GFXPAYLOAD}\"" >> ${INSTALL_ROOT}/etc/conf.d/grub || die |
clearconfig |
664 |
|
addconfig "export GRUB_CMDLINE_LINUX_DEFAULT=\"${KERNELOPTS}\"" |
665 |
|
addconfig "export GRUB_GFXPAYLOAD_LINUX=\"${GRUB2GFXPAYLOAD}\"" |
666 |
fi |
fi |
667 |
CONFIG=${INSTALL_ROOT}/.installrc |
CONFIG=${INSTALL_ROOT}/.installrc |
668 |
clearconfig |
clearconfig |
818 |
# use the blkid from util-linux instead of busybox |
# use the blkid from util-linux instead of busybox |
819 |
if [[ ${FORMAT_FILESYSTEM} = f2fs ]] |
if [[ ${FORMAT_FILESYSTEM} = f2fs ]] |
820 |
then |
then |
821 |
if [[ -x $(which blkid &> /dev/null) ]] |
if [[ -x $(type -P blkid) ]] |
822 |
then |
then |
823 |
return 0 |
return 0 |
824 |
fi |
fi |
825 |
else |
else |
826 |
if [[ -x $(which busybox.mkinitrd &> /dev/null) ]] |
if [[ -x $(type -P busybox.mkinitrd) ]] |
827 |
then |
then |
828 |
# only detect uuids if supported |
# only detect uuids if supported |
829 |
if [[ ! -z $(busybox.mkinitrd | grep blkid) ]] |
if [[ ! -z $(busybox.mkinitrd | grep blkid) ]] |
866 |
|
|
867 |
install_system_settings() |
install_system_settings() |
868 |
{ |
{ |
869 |
# schreibe fstab |
local CONFIG |
870 |
if is_uuid_supported |
local fstype |
871 |
|
|
872 |
|
# write fstab |
873 |
|
CONFIG=${INSTALL_ROOT}/etc/fstab |
874 |
|
clearconfig |
875 |
|
|
876 |
|
if [[ -n ${BOOTHDD} ]] |
877 |
then |
then |
878 |
if [[ -n ${BOOTHDD} ]] |
if [[ ${FORMAT_FILESYSTEM} = f2fs ]] |
|
then |
|
|
echo -e "UUID=$(get_uuid ${BOOTHDD})\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALL_ROOT}/etc/fstab || die |
|
|
fi |
|
|
if [[ -n ${ROOTHDD} ]] |
|
879 |
then |
then |
880 |
echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALL_ROOT}/etc/fstab || die |
# grub/grub2 does not support boot from f2fs, use ext2 instead |
881 |
|
fstype="ext2" |
882 |
|
else |
883 |
|
fstype="${FORMAT_FILESYSTEM}" |
884 |
fi |
fi |
885 |
else |
if is_uuid_supported |
|
if [[ -n ${BOOTHDD} ]] |
|
886 |
then |
then |
887 |
echo -e "${BOOTHDD}\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALL_ROOT}/etc/fstab || die |
addconfig -e "UUID=$(get_uuid ${BOOTHDD})\t/boot\t${fstype}\tnoatime,noauto\t1 1" |
888 |
|
else |
889 |
|
addconfig -e "${BOOTHDD}\t/boot\t${fstype}\tnoatime,noauto\t1 1" |
890 |
fi |
fi |
891 |
if [[ -n ${ROOTHDD} ]] |
fi |
892 |
|
|
893 |
|
if [[ -n ${ROOTHDD} ]] |
894 |
|
then |
895 |
|
if is_uuid_supported |
896 |
then |
then |
897 |
echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALL_ROOT}/etc/fstab || die |
addconfig -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" |
898 |
|
else |
899 |
|
addconfig -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" |
900 |
fi |
fi |
901 |
fi |
fi |
902 |
|
|
903 |
# not needed busybox loads all with swapon -a, even if not mentioned in fstab |
# not needed busybox loads all with swapon -a, even if not mentioned in fstab |
904 |
#echo -e "UUID='$(get_uuid ${SWAPHDD})'\tswap\tswap\tpri=1\t0 0" >> ${INSTALL_ROOT}/etc/fstab || die |
#addconfig -e "UUID='$(get_uuid ${SWAPHDD})'\tswap\tswap\tpri=1\t0 0" |
905 |
echo -e "proc\t/proc\tproc\tdefaults\t0 0" >> ${INSTALL_ROOT}/etc/fstab || die |
addconfig -e "proc\t/proc\tproc\tdefaults\t0 0" |
906 |
echo -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0" >> ${INSTALL_ROOT}/etc/fstab || die |
addconfig -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0" |
907 |
|
|
908 |
# install network config skeleton |
# install network config skeleton |
909 |
install -m0644 ${INSTALL_ROOT}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALL_ROOT}/etc/conf.d/ || die |
install -m0644 ${INSTALL_ROOT}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALL_ROOT}/etc/conf.d/ || die |