Casper overriding live username and hostname settings

I had a few people complain about this problem. In a nutshell, when you decide to change the live username and hostname, casper does not recognize it.

This is caused by a commit made by the Ubuntu installer team: (mythbuntu did get changed to $FLAVOUR right after).  You can also see this reflected in /etc/casper.conf (sorry about the lack of empty lines, wordpress does not allow it):

# This file should go in /etc/casper.conf
# Supported variables are:
export USERNAME="ubuntu"
export USERFULLNAME="Live session user"
export HOST="ubuntu"
export BUILD_SYSTEM="Ubuntu"
# USERNAME and HOSTNAME as specified above won't be honoured and will be set to
# flavour string acquired at boot time, unless you set FLAVOUR to any
# non-empty string.
# export FLAVOUR="Ubuntu"

So what do you do about it? One way is to edit the /etc/casper.conf and just change $FLAVOUR to what you wish (and have username and the hostname the same), which I would recommend. But if you really need the username and the hostname different, you can edit /usr/share/initramfs-tools/scripts/casper, and remove this line: sed -i "s,USERNAME=.*,USERNAME=\"$FLAVOUR\",g; s,HOST=.*,HOST=\"$FLAVOUR\",g" /etc/casper.conf (do not copy and paste this into your text editors find function, as wordpress breaks the formatting of this line, so it looks different).

Anyways, reason why I brought this up now is because I’m actually at that stage of writing relinux 0.4! This means that I will have finished the untested code done pretty soon.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: