summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-includes/lib
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2018-11-17 18:57:14 +0000
committerintrigeri <intrigeri@boum.org>2018-11-18 20:03:10 +0000
commiteaf91f2e8245fdd07f778a006f8e46253ff45b60 (patch)
tree896e4bd1ecc707345d10c886c72186b70bec6789 /config/chroot_local-includes/lib
parentf45877922e6c90325d8cab0e1003adfd885e03a1 (diff)
Remove the boot readahead feature (refs: #15915).
Our work on the USB image project (#15292) will deprecate booting from DVD except for VMs. So the use cases we'll still support are: - booting from a USB stick - booting a VM from an ISO In both cases, readahead does not matter much (or at all), so let's simplify things.
Diffstat (limited to 'config/chroot_local-includes/lib')
-rwxr-xr-xconfig/chroot_local-includes/lib/live/config/0000-boot-profile3
-rwxr-xr-xconfig/chroot_local-includes/lib/live/config/0000-readahead51
2 files changed, 0 insertions, 54 deletions
diff --git a/config/chroot_local-includes/lib/live/config/0000-boot-profile b/config/chroot_local-includes/lib/live/config/0000-boot-profile
index ee0e1be..9daaa41 100755
--- a/config/chroot_local-includes/lib/live/config/0000-boot-profile
+++ b/config/chroot_local-includes/lib/live/config/0000-boot-profile
@@ -28,9 +28,6 @@ EOF
echo 32768 >/proc/sys/fs/inotify/max_user_watches
/usr/local/lib/boot-profile /var/log/boot-profile
- # Put readahead list at the very begining
- head -n 1 /usr/share/tails/readahead-list >/dev/null || true
-
# Creating state file
touch /var/lib/live/config/boot-profile
}
diff --git a/config/chroot_local-includes/lib/live/config/0000-readahead b/config/chroot_local-includes/lib/live/config/0000-readahead
deleted file mode 100755
index 536c34a..0000000
--- a/config/chroot_local-includes/lib/live/config/0000-readahead
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-
-READAHEAD_LIST="/usr/share/tails/readahead-list"
-BACKGROUND_AT="^usr/bin/Xorg$"
-
-Readahead ()
-{
-
- # Do not readahead when "profile" appears on kernel command line
- if grep -qw "profile" /proc/cmdline
- then
- return 0
- fi
-
- if ! test -e "$READAHEAD_LIST"
- then
- echo "the readahead list (${READAHEAD}) does not exist."
- return
- fi
-
- echo " readahead"
- Start_readahead
-}
-
-Start_readahead ()
-{
- FG_FILES="sed -n -e \\:$BACKGROUND_AT:q;p $READAHEAD_LIST"
- BG_FILES="sed -n -e \\:$BACKGROUND_AT:,\$p $READAHEAD_LIST"
- FG_SIZE=$(
- cd /
- $FG_FILES |
- xargs du -bc 2>/dev/null |
- awk '$2 ~ /^total$/ { t = t + $1 } END { print t }')
- (cd /
- $BG_FILES |
- xargs stat >/dev/null 2>/dev/null || :)
- (cd /
- $FG_FILES |
- xargs cat 2>/dev/null |
- pv -f -s ${FG_SIZE} >/dev/null || :)
- (cd /
- start-stop-daemon \
- --start --background --make-pidfile --startas /bin/sh \
- --pidfile /run/background-readahead.pid -- \
- -c "$BG_FILES | xargs cat >/dev/null 2>&1")
-
- # Creating state file
- touch /var/lib/live/config/readahead
-}
-
-Readahead