Code review comment for lp://staging/~taihsiangho/ubiquity/trusty-proposed

Revision history for this message
Taihsiang Ho (taihsiangho) wrote :

@ Dimitri

Thanks for your comment. I have tried the following boot parameter at the OOBE oem-config boot stage:
1. automatic-oem-config: this works very well.
2. url=http://foo-bar/preseed.cfg and file=foo-bar/preseed.cfg. They did not work. I think this is rational because no more boot parameters are read by oem-config at the OOBE oem-config boot stage according to this code:

etc/init/oem-config.conf:
 35 for x in $(cat /proc/cmdline); do
 36 case $x in
 37 debug-oem-config)
 38 debug=--debug
 39 ;;
 40 # We never want to run the oem-config job in the live environment
 41 # (as is the case in some custom configurations) or in recovery
 42 # mode.
 43 boot=casper|single)
 44 exit 0
 45 ;;
 46 ubiquity/frontend=*)
 47 frontend="${x#*=}"
 48 export FRONTEND=$frontend
 49 ;;
 50 automatic-oem-config)
 51 automatic=--automatic
 52 ;;
 53 esac
 54 done

However,
preseed/early_command (or preseed/late_command) looks promising. I also found

oem-config oem-config/early_command string /usr/share/ubuntu/scripts/oem_config.sh early /dev/sda1 /cdrom
oem-config oem-config/late_command string /usr/share/ubuntu/scripts/oem_config.sh late

and /usr/share/ubuntu/scripts/oem_config.sh shows

 81 # Call the oem-config-general script for general types of tasks
 82 if [ -e "/usr/share/ubuntu/scripts/oem-config-general.sh" ]; then
 83 /usr/share/ubuntu/scripts/oem-config-general.sh $1
 84 fi

so I may do something by hooking up a oem-config-general.sh.

Or, just use preseed/early_command (or preseed/late_command).

Let me figure out when preseed/early_command (and preseed/late_command) will be applied and whether they meet my requirement or not first.

« Back to merge proposal