Comment 7 for bug 290351

Revision history for this message
Stéphane Graber (stgraber) wrote :

I just commited a fix for that to the casper packaging branch (as well as a few other fixes).

I tested the change with Edubuntu, confirmed that the system boots, that the session properly starts and that the user has sudo access.

Diff below:
=== modified file 'scripts/casper'
--- scripts/casper 2011-12-13 00:11:22 +0000
+++ scripts/casper 2011-12-14 19:38:24 +0000
@@ -684,6 +684,16 @@

     log_end_msg

+ # Allow to override USERNAME and HOST based on media information
+ if [ -f /cdrom/.disk/info ]; then
+ FLAVOUR="$(cut -d' ' -f1 "/cdrom/.disk/info" 2>/dev/null | tr '[A-Z]' '[a-z]')" || FLAVOUR=
+ if [ -n "$FLAVOUR" ]; then
+ HOST=$FLAVOUR
+ USERNAME=$FLAVOUR
+ export HOST USERNAME
+ fi
+ fi
+
     # unionfs-fuse needs /dev to be bind-mounted for the duration of
     # casper-bottom; udev's init script will take care of things after that
     if [ "${UNIONFS}" = unionfs-fuse ]; then