mirror of
https://github.com/koreader/koreader
synced 2024-11-20 03:25:34 +00:00
17bdd56e02
It's been made redundant by the RPATH changes The only platform that gets the dubious honor of actually needing an LD_LIBRARY_PATH is PocketBook, because of InkView. Co-authored-by: Benoit Pierre <benoit.pierre@gmail.com> Bump base to pull in the aforementioned RPATH changes ;). https://github.com/koreader/koreader-base/pull/1638
25 lines
957 B
Bash
Executable File
25 lines
957 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# NOTE: Close any non-standard fds, so that it doesn't come back to bite us in the ass with USBMS later...
|
|
for fd in /proc/"$$"/fd/*; do
|
|
fd_id="$(basename "${fd}")"
|
|
if [ -e "${fd}" ] && [ "${fd_id}" -gt 2 ]; then
|
|
# NOTE: dash (meaning, in turn, busybox's ash, uses fd 10+ open to /dev/tty or $0 (w/ CLOEXEC))
|
|
fd_path="$(readlink -f "${fd}")"
|
|
if [ "${fd_path}" != "/dev/tty" ] && [ "${fd_path}" != "$(readlink -f "${0}")" ] && [ "${fd}" != "${fd_path}" ]; then
|
|
eval "exec ${fd_id}>&-"
|
|
echo "[obtain-ip.sh] Closed fd ${fd_id} -> ${fd_path}"
|
|
fi
|
|
fi
|
|
done
|
|
|
|
./release-ip.sh
|
|
|
|
# NOTE: Prefer dhcpcd over udhcpc if available. That's what Nickel uses,
|
|
# and udhcpc appears to trip some insanely wonky corner cases on current FW (#6421)
|
|
if [ -x "/sbin/dhcpcd" ]; then
|
|
dhcpcd -d -t 30 -w "${INTERFACE}"
|
|
else
|
|
udhcpc -S -i "${INTERFACE}" -s /etc/udhcpc.d/default.script -b -q
|
|
fi
|