[Nut-upsdev] megatec and some changes to cmdvartab and new-names.txt

Arjen de Korte nut+devel at de-korte.org
Mon Dec 4 13:52:58 CET 2006


> Adding the following lines to the upsdrv_banner() function in the megatec
> driver should do the trick:
>
> if (strcmp(progname, "megatec"))
> {
> 	printf("The '%s' driver is replaced by the 'megatec' driver.\n",
> progname);
> 	printf("Please update your 'ups.conf' configuration file.\n\n");
> }

[...]

I'm an idiot. :-(

We need to do something in drivers/main.c as well, to make sure 'progname'
contains something useful before calling upsdrv_banner(). I have probably
not fully recuperated from my business trip to Chicago last week.

I'll commit this change to drivers/main.c later today. It might be useful
to know the program name at that time anyway, even without softlinks to
replace obsolete drivers silently.

Regards, Arjen




More information about the Nut-upsdev mailing list