Bug#818065: console-setup is not read correctly at boottime and must be started manually

2017-10-23 Thread Rupert Perry
Hi Anton,

> > > This happened to me as well, check if a slight change to the systemd
> > > unit file helps:
> > > /lib/systemd/system/console-setup.service
> > > RequiresMountsFor=/usr /tmp
> > 
> > I have this same problem and I tried this solution and it didn't fix 
> > the problem for me.
> 
> I suppose this fixes the problem with the upgrades of console-setup. But I
> don't like this solution because even if it fixes the problem (does it?),
> it is not the right solution.  I don't think console-setup 
> needs /tmp for its work.  This solution works only because requiring 
> /tmp to be mounted means some other dependency will be satisfied as 
> well.  But who knows what this other dependency is...

Just to be clear - I tried adding /tmp to the unit file and it did NOT fix the 
problem.  I had to re-generate the cache files to resolve the issue and I 
restored the system unit file to not require a mount for /tmp as before.  

The bug is that there was a reference to a non-existent file in /tmp in the 
previous version of /etc/console-setup/cached_setup_keyboard.sh which 
disappeared when it was re-generated.  I imagine the /tmp file was there when 
it was originally generated, but it was of course not there on a subsequent 
reboot.  When I regenerated the cache files 
/etc/console-setup/cached_setup_keyboard.sh changed as follows:

-loadkeys '/tmp/tmpkbd.iDWdSi' > '/dev/null'
+loadkeys '/etc/console-setup/cached_UTF-8_del.kmap.gz' > '/dev/null'

Rupert.



Bug#818065: console-setup is not read correctly at boottime and must be started manually

2017-10-23 Thread Rupert Perry
Hi

> This happened to me as well, check if a slight change to the systemd
> unit file helps:
> /lib/systemd/system/console-setup.service
> RequiresMountsFor=/usr /tmp
>
> i.e. add /tmp
> My /tmp is mounted as tmpfs so that could pose a problem. After changing
> this line console-setup seems to start normally during the boot up.


I have this same problem and I tried this solution and it didn't fix the 
problem for me.  However, when I then ran 'rm /etc/console-setup/cached_*' and 
then 'setupcon --save-only' and this fixed the problem.



As I am running etckeeper, I checked to see the difference in the newly 
generated files and noticed that the old loadkeys in 
/etc/console-setup/cached_setup_keyboard.sh refers to a temporary file in /tmp 
whereas the new version refers to /etc/console-setup/cached_UTF-8_del.kmap.gz 
instead.  See here:



root@duck:/etc# git diff

diff --git a/console-setup/cached_setup_keyboard.sh 
b/console-setup/cached_setup_keyboard.sh

index bdc822d..30b46c1 100755

--- a/console-setup/cached_setup_keyboard.sh

+++ b/console-setup/cached_setup_keyboard.sh

@@ -10,4 +10,4 @@ kbd_mode '-u' < '/dev/tty3'

 kbd_mode '-u' < '/dev/tty4'

 kbd_mode '-u' < '/dev/tty5'

 kbd_mode '-u' < '/dev/tty6'

-loadkeys '/tmp/tmpkbd.iDWdSi' > '/dev/null'

+loadkeys '/etc/console-setup/cached_UTF-8_del.kmap.gz' > '/dev/null'

root@duck:/etc#



It would seem to me that when the original cached_setup_keyboard.sh was 
generated previously, the temporary file was incorrectly put into /etc/ 
console-setup/cached_setup_keyboard.sh instead of the correct file.



Best wishes,



Rupert.