Discussion:
echo and logging in %post
Ingo Jochim
2005-12-14 13:48:03 UTC
Permalink
Hopefully you can help on this.

I'm doing a kickstart installation on Fedora Core 4.
I like to install some additional packages in the %post part of kickstart.

I like to create a new file and want to write something into it.
Here is my code:
echo $RANDOM > "/root/ID"

The result in the file is always fine.
But the new file name is strange to me.
If I do a "ls -l" I get "ID?" displayed.
If I just write the beginning of the file and use the TAB-key then I get
"ID^M".

What is wrong?
And how can I see all the output while the system does all the %post
commands?

Thank you very much in advance.
Ingo
Jason Kohles
2005-12-14 13:50:46 UTC
Permalink
Post by Ingo Jochim
Hopefully you can help on this.
I'm doing a kickstart installation on Fedora Core 4.
I like to install some additional packages in the %post part of kickstart.
I like to create a new file and want to write something into it.
echo $RANDOM > "/root/ID"
The result in the file is always fine.
But the new file name is strange to me.
If I do a "ls -l" I get "ID?" displayed.
If I just write the beginning of the file and use the TAB-key then I get
"ID^M".
You are creating your kickstart configuration in a windows/dos text editor,
and it has windows line endings, rather than unix ones. Either use a text
editor that can save with unix line endings, or use something like the
dos2unix command after you create it, or FTP it in text mode to your server
before using it. You need to do something to get rid of the extra ^M at the
end of every line in your ks.cfg.

--
Jason Kohles
***@jasonkohles.com - http://www.jasonkohles.com/
"A witty saying proves nothing." -- Voltaire
Ingo Jochim
2005-12-15 10:46:24 UTC
Permalink
Thank you Jason.
You were right.
I did create the kickstart script on a linux machine. But then I used
WinScp to copy the file to a Windows machine. There I have GuildFTPD
running as ftp server.
WinScp or GuildFTPD make the changes to my file.
Now I started the kickstart script from a floppy and everything works fine.

Thank you again.
Ingo
Post by Ingo Jochim
Hopefully you can help on this.
I'm doing a kickstart installation on Fedora Core 4.
I like to install some additional packages in the %post part of kickstart.
I like to create a new file and want to write something into it.
echo $RANDOM > "/root/ID"
The result in the file is always fine.
But the new file name is strange to me.
If I do a "ls -l" I get "ID?" displayed.
If I just write the beginning of the file and use the TAB-key then I get
"ID^M".
You are creating your kickstart configuration in a windows/dos text
editor, and it has windows line endings, rather than unix ones.
Either use a text editor that can save with unix line endings, or use
something like the dos2unix command after you create it, or FTP it in
text mode to your server before using it. You need to do something to
get rid of the extra ^M at the end of every line in your ks.cfg.
--
Jason Kohles
http://www.jasonkohles.com/
"A witty saying proves nothing." -- Voltaire
------------------------------------------------------------------------
_______________________________________________
Kickstart-list mailing list
https://www.redhat.com/mailman/listinfo/kickstart-list
Loading...