Commit 121d7657 authored by intrigeri's avatar intrigeri
Browse files

Replace the /var/run/ compatibility symlink with the canonical /run/ in all paths.

parent 53d880a1
......@@ -21,7 +21,7 @@
### Init variables
TORDATE_DIR=/var/run/tordate
TORDATE_DIR=/run/tordate
TORDATE_DONE_FILE=${TORDATE_DIR}/done
TOR_CONSENSUS=${TOR_DIR}/cached-microdesc-consensus
TOR_UNVERIFIED_CONSENSUS=${TOR_DIR}/unverified-microdesc-consensus
......
......@@ -41,7 +41,7 @@ Start_readahead ()
(cd /
start-stop-daemon \
--start --background --make-pidfile --startas /bin/sh \
--pidfile /var/run/background-readahead.pid -- \
--pidfile /run/background-readahead.pid -- \
-c "$BG_FILES | xargs cat >/dev/null 2>&1")
# Creating state file
......
......@@ -12,7 +12,7 @@ export TEXTDOMAIN
# Import no_abort()
. /usr/local/lib/tails-shell-library/common.sh
TORDATE_DIR=/var/run/tordate
TORDATE_DIR=/run/tordate
TORDATE_DONE_FILE="${TORDATE_DIR}/done"
INOTIFY_TIMEOUT=60
MIN_REAL_MEMFREE=$((300 * 1024))
......
......@@ -10,7 +10,7 @@ unset TOR_CONTROL_PASSWD
unset TOR_FORCE_NET_CONFIG
export TOR_CONFIGURE_ONLY=1
export TOR_CONTROL_PORT=9051
export TOR_CONTROL_COOKIE_AUTH_FILE=/var/run/tor/control.authcookie
export TOR_CONTROL_COOKIE_AUTH_FILE=/run/tor/control.authcookie
export TOR_HIDE_BROWSER_LOGO=1
if echo "$@" | grep -qw -- --force-net-config; then
export TOR_FORCE_NET_CONFIG=1
......
......@@ -32,8 +32,8 @@ use POSIX;
### initialization
setlocale(LC_MESSAGES, "");
textdomain("tails");
my $htp_done_file = '/var/run/htpdate/done';
my $htp_success_file = '/var/run/htpdate/success';
my $htp_done_file = '/run/htpdate/done';
my $htp_success_file = '/run/htpdate/success';
my $htp_log_file = '/var/log/htpdate.log';
my $debug;
......
......@@ -11,7 +11,7 @@ get_tor_control_port() {
}
tor_control_send() {
COOKIE=/var/run/tor/control.authcookie
COOKIE=/run/tor/control.authcookie
HEXCOOKIE=$(xxd -c 32 -g 0 $COOKIE | cut -d' ' -f2)
/bin/echo -ne "AUTHENTICATE ${HEXCOOKIE}\r\n${1}\r\nQUIT\r\n" | \
nc 127.0.0.1 $(get_tor_control_port) | tr -d "\r"
......
......@@ -136,8 +136,8 @@ import yaml
DEFAULT_LISTEN_ADDRESS = 'localhost'
DEFAULT_LISTEN_PORT = 9051
DEFAULT_COOKIE_PATH = '/var/run/tor/control.authcookie'
DEFAULT_CONTROL_SOCKET_PATH = '/var/run/tor/control'
DEFAULT_COOKIE_PATH = '/run/tor/control.authcookie'
DEFAULT_CONTROL_SOCKET_PATH = '/run/tor/control'
class NoRewriteMatch(RuntimeError):
......
......@@ -9,7 +9,7 @@ import syslog
PERSISTENCE_DIR = "/live/persistence/TailsData_unlocked"
PACKAGES_LIST_FILE = PERSISTENCE_DIR + "/live-additional-software.conf"
ACTIVATION_FILE = "/var/run/live-additional-software/activated"
ACTIVATION_FILE = "/run/live-additional-software/activated"
def _launch_apt_get(specific_args):
"""Launch apt-get with given args
......
......@@ -366,14 +366,14 @@ Given /^Tor has built a circuit$/ do
end
Given /^the time has synced$/ do
["/var/run/tordate/done", "/var/run/htpdate/success"].each do |file|
["/run/tordate/done", "/run/htpdate/success"].each do |file|
try_for(300) { $vm.execute("test -e #{file}").success? }
end
end
Given /^available upgrades have been checked$/ do
try_for(300) {
$vm.execute("test -e '/var/run/tails-upgrader/checked_upgrades'").success?
$vm.execute("test -e '/run/tails-upgrader/checked_upgrades'").success?
}
end
......
......@@ -314,7 +314,7 @@ end
And /^I re-run htpdate$/ do
$vm.execute_successfully("service htpdate stop && " \
"rm -f /var/run/htpdate/* && " \
"rm -f /run/htpdate/* && " \
"systemctl --no-block start htpdate.service")
step "the time has synced"
end
......
......@@ -387,7 +387,7 @@ status/enough-dir-info` seems interesting, but isn't a replacement.
Shell function which is useful for the above:
tor_control_getinfo() {
COOKIE=/var/run/tor/control.authcookie
COOKIE=/run/tor/control.authcookie
HEXCOOKIE=$(xxd -c 32 -g 0 $COOKIE | cut -d' ' -f2)
echo -e "AUTHENTICATE $HEXCOOKIE\nGETINFO ${1}\nQUIT" | \
nc 127.0.0.1 9051 | grep "^250-${1}=" | sed "s@^250-${1}=@@"
......
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