Bug#819288: /tmp is used before /tmp being mounted
On Wed, Apr 13, 2016 at 11:52:44AM +0200, François Scala wrote:
>
> While working on a Debian installation base on a ZFS root filesystem
> with LUKS encryption I've encountered a problem with keyboard-setup
> init script that create file in /tmp before /tmp being mounted.
Yes, keyboard-setup can attempt to create files in /tmp but it can do
its job even when it is impossible to create a file there (because some
other locations will be tried instead of /tmp). There is some chance,
however, that after keyboard-setup creates a temporary file in /tmp,
/tmp gets mounted and the temporary file will no longer be accessible.
Fortunately, this is not a big problem, because temporary files will be
used only if not everything necessary is prepared in /etc/console-setup.
The other init script of console-setup -- /etc/init/console-setup(.sh)
-- has the job to put in /etc/console-setup the necessary files. This
means that if you reboot the system, no files in /etc will be used.
I suppose I have to document in the man pages of /etc/default/keyboard
and /etc/default/console-setup that the sysadmin has to run
setupcon --save-only
if he edits some of these files and /tmp is in a separate file system.
> Here is the process tree
>
> |-keyboard-setup,1334 /etc/init.d/keyboard-setup start
> | `-setupcon,1336 /bin/setupcon -k
> | `-ckbcomp,1387 /usr/bin/ckbcomp -backspace del -model pc105 us
This information confirms that not all necessary files were present in
/etc/console-setup. Normally setupcon does not run ckbcomp and in the
recent versions of console-setup (>=1.138) the keyboard-setup.sh init
script does not run setupcon.
Anton Zinoviev
Reply to: