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

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:

 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

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

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

and /usr/share/ubuntu/scripts/ shows

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

so I may do something by hooking up a

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