From f246a9e82d7f5d93c1447c4f3a2340d3c9f8a3b3 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sun, 17 Apr 2022 10:17:42 +0200 Subject: [PATCH] modules/environment/login: avoid no fakeProcStat warning --- modules/environment/login/login.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/environment/login/login.nix b/modules/environment/login/login.nix index bf8321b..4a86865 100644 --- a/modules/environment/login/login.nix +++ b/modules/environment/login/login.nix @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. { config, writeScript, writeText }: @@ -31,10 +31,10 @@ writeScript "login" '' fi fi - if [ -r /proc/stat ]; then - BIND_PROC_STAT="" - else + if [ ! -r /proc/stat ] && [ -e ${fakeProcStat} ]; then BIND_PROC_STAT="-b ${installationDir}${fakeProcStat}:/proc/stat" + else + BIND_PROC_STAT="" fi exec ${installationDir}/bin/proot-static \