Commit f5716f9a authored by Evgeni Golov's avatar Evgeni Golov

Merge remote-tracking branch 'grml'

parents 30b31df2 6f465ddc
......@@ -47,9 +47,13 @@ install:
# Installing executables
mkdir -p $(DESTDIR)/usr/share/initramfs-tools/hooks
cp backend/initramfs-tools/live.hook $(DESTDIR)/usr/share/initramfs-tools/hooks/live
for f in backend/initramfs-tools/*.hook; do \
cp $${f} $(DESTDIR)/usr/share/initramfs-tools/hooks/$$(basename $${f} .hook); \
done
mkdir -p $(DESTDIR)/usr/share/initramfs-tools/scripts
cp backend/initramfs-tools/live.script $(DESTDIR)/usr/share/initramfs-tools/scripts/live
for f in backend/initramfs-tools/*.script; do \
cp $${f} $(DESTDIR)/usr/share/initramfs-tools/scripts/$$(basename $${f} .script); \
done
mkdir -p $(DESTDIR)/bin
cp frontend/* $(DESTDIR)/bin
......
#!/bin/sh
# hook for adding kms modules
set -e
# initramfs-tools header
PREREQ=""
prereqs()
{
echo "${PREREQ}"
}
case "${1}" in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
for module in i915 radeon nouveau ; do
manual_add_modules $module
done
......@@ -215,23 +215,19 @@ fi
# Some experimental stuff
case "${LIVE_DNS}" in
true)
[ "${QUIET}" ] || echo -n " dns"
# /lib/libnss_dns.so.*:a DNS
# /lib/libnss_files.so.*: /etc/hosts and /etc/passwd
# /lib/libnss_compat.so.*: /etc/passwd
for _SHLIB in $(find /lib -name 'libnss_dns.so.*')
do
copy_exec "${_SHLIB}"
done
# might be needed if /etc/hosts is used
#mkdir -p "${DESTDIR}/etc"
#cp -p /etc/nsswitch.conf "${DESTDIR}/etc"
;;
esac
[ "${QUIET}" ] || echo -n " dns"
# /lib/libnss_dns.so.*:a DNS
# /lib/libnss_files.so.*: /etc/hosts and /etc/passwd
# /lib/libnss_compat.so.*: /etc/passwd
for _SHLIB in $(find /lib -name 'libnss_dns.so.*')
do
copy_exec "${_SHLIB}"
done
# might be needed if /etc/hosts is used
#mkdir -p "${DESTDIR}/etc"
#cp -p /etc/nsswitch.conf "${DESTDIR}/etc"
[ "${QUIET}" ] || echo .
......@@ -53,4 +53,20 @@ Read_only ()
;;
esac
done
if grep -qe persistence /proc/cmdline
then
printf " * Persistence mode enabled, searching for persistency related devices to unlock\n" >/dev/console
for label in custom-ov home-rw home-sn live-rw live-sn persistence
do
if blkid -t LABEL="$label" | grep -q '.'
then
device=$(blkid -t LABEL="$label" | awk -F: '{print $1}')
printf " - Setting device %-9s with label '%s' to write mode for persistence mode: " "$device" "$label" >/dev/console
blockdev --setrw $device && printf "done\n" >/dev/console || printf "failed\n" >/dev/console
fi
done
fi
}
......@@ -17,7 +17,12 @@ Cmdline_old ()
BOOTIF=*)
BOOTIF="${_PARAMETER#BOOTIF=}"
;;
dns=*)
DNS=${_PARAMETER#dns=}
DNSSERVERS=$(echo ${DNS} | sed 's/,/ /g')
export DNSSERVERS
unset DNS
;;
dhcp)
# Force dhcp even while netbooting
# Use for debugging in case somebody works on fixing dhclient
......
......@@ -58,6 +58,7 @@ Live ()
then
# We found a memdisk, set up phram
modprobe phram phram=memdisk,${MEMDISK}
modprobe phram phram=memdisk,${MEMDISK}
# Load mtdblock, the memdisk will be /dev/mtdblock0
modprobe mtdblock
......
......@@ -420,6 +420,12 @@ is_supported_fs ()
return 1
fi
# get_fstype might report "unknown" or "swap", ignore it as no such kernel module exists
if [ "${fstype}" = "unknown" ] || [ "${fstype}" = "swap" ]
then
return 1
fi
# Try to look if it is already supported by the kernel
if grep -q ${fstype} /proc/filesystems
then
......
......@@ -151,7 +151,7 @@ do_netsetup ()
echo "search ${DNSDOMAIN}" >> /etc/resolv.conf
fi
for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1}
for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1} ${DNSSERVERS}
do
if [ -n "$i" ] && [ "$i" != 0.0.0.0 ]
then
......
......@@ -86,8 +86,7 @@ copy_live_to ()
echo " * Copying whole medium to RAM" 1>/dev/console
rsync -a --progress ${copyfrom}/* ${copyto} 1>/dev/console # "cp -a" from busybox also copies hidden files
else
mkdir -p ${copyto}/${LIVE_MEDIA_PATH}
cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/* ${copyto}/${LIVE_MEDIA_PATH}
cp -a ${copyfrom}/* ${copyto}/
if [ -e ${copyfrom}/${LIVE_MEDIA_PATH}/.disk ]
then
cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/.disk ${copyto}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment