autogenerating /etc/issue

elko elko at
Wed Jul 4 08:00:28 PDT 2001

On Wednesday 04 July 2001 12:05, Sanjuro Europa wrote:
> >uhm - kernel-reset?!?
> Sorry, I mean terminal reset.
> > > How do I generate a esc character in a file?
> Sorry, I didn't make myself clear. Here is what I mean:
> I have a script called /etc/rc.d/init.d/local it is called as last script
> in all runlevels (S999local) and it contains (among other things) the
> following lines:
> echo "LFS Linux 3.0-pre4" > /etc/issue
> echo "Kernel $(uname -r) on $a $(uname -m)" >> /etc/issue
> echo "" >> /etc/issue
> The idea is to dynamically generate a issue file at start-up so it reflects
> the kernel version of the kernel I am booting.
> Now, how do I insert a clear and reset terminal code (and which code do I
> need) at the beginning of the file?

#> man getty
--[ snip ]--
	During its  startup, getty looks for the file /etc/conf.getty.line, 
	(or, if it cannot find that file, then /etc/conf.getty), and if found, 
	reads the  contents for lines of the form

--[ snip ]--
		If value is NO, then getty will not attempt to clear the
		video screen before typing the issue or login prompts.
		The default is to clear the screen.
--[ snip ]--

and if that doesn't work, you could try ^L (when typed in BaSH,
it clears the screen).

while I was on my way, I looked it up for you:

the answer is on the first page:
	a literal ESCAPE, followed by a c (^[c, sequence: ^VESCc)

Unsubscribe: send email to lfs-discuss-request at
and put unsubscribe in the subject header of the message

More information about the lfs-dev mailing list