date command in debian-installer busybox

Asked by Steven Cherry

I building my own udeb that needs to get the system time. However, the date command is not inculded in the busybox console thats included in the debian-installer.

Is there any other way to get the system time/date. The nformat I need is

DDMMYY

Thanks
Steve

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu debian-installer Edit question
Assignee:
No assignee Edit question
Solved by:
Colin Watson
Solved:
Last query:
Last reply:
Revision history for this message
Colin Watson (cjwatson) said :
#1

You might just have to write a trivial C program to do this and put it in your udeb. We generally try to keep the busybox-udeb configuration fairly minimal.

Revision history for this message
Steven Cherry (sc-s) said :
#2

Thanks Colin

I'm actually building my debian-installer from source. I'm not sure if this builds busybox or just pulls in the busybox udeb binary package.

Is there any easy way to include the date command when building the debian-installer?

Thanks again
Steve

Revision history for this message
Colin Watson (cjwatson) said :
#3

If you want to build local installer images with a customised version of busybox-udeb, then the simplest way is to build the busybox source package separately, copy the resulting busybox-udeb binary into build/localudebs/ in the debian-installer tree, and then build debian-installer. Alternatively, you can create a local apt archive containing busybox-udeb and point build/sources.list.udeb.local at it.

Revision history for this message
Best Colin Watson (cjwatson) said :
#4

Enabling date in busybox-udeb should be a matter of editing debian/config/pkg/udeb, by the way.

Revision history for this message
Steven Cherry (sc-s) said :
#5

This sounds like a plan

Thanks for all your help Colin

Revision history for this message
Steven Cherry (sc-s) said :
#6

Thanks Colin Watson, that solved my question.