Custom command in install.cfg

Dear forum users,

I'm trying to set up a PXE-booted, fully automated installation of FreeBSD. I got everything set up and working (very sweet I must say), but... at the end of the installation, just before I do the "shutdown", I want to execute some custom command. I've been banging my head against it all day I can't it to work.

Just for testing purposes it I'm trying this:
Code:
command='touch /root/TEST.txt'
I don't get any errors executing this so I'm thinking it's ok, but the file is not created.

In the end I want to set the public ip-address (I'm installing from a management-network where the dhcp-server is sitting), and activate sshd in /etc/rc.conf

Anyone got this working?

Any help would be greatly appreciated.

Best regards,
Freddie
 
similar problem here

Hi,

Freddie, did you look in tty2 for errors? what where the errors?

I've got the same problem.
below my code:
Code:
command="/sbin/mount>>/tmp/info"
system
command="/bin/pwd>>/tmp/info"
system
command="cd /tmp"
system
command="/bin/pwd>>/tmp/info"
system
command="/usr/bin/fetch http://${inst_server}/inst/post-scripts/freebsd-postinstall 2>&1>>/tmp/install.log"
system
command="/bin/chmod +x /tmp/freebsd-postinstall"
systenfs server cider:/data/scripts: not responding
command="/tmp/freebsd-postinstall|/usr/bin/tee /tmpnfs server cider:/data/scripts: is alive again
system
command="/sbin/reboot"
system
The errors I got where
Code:
/sbin/mout>>/tmp/info: not found
 
@FreddieB did you try to use the full path to the command?


@aswen Add a space after the command and before the redirect.
 
@SirDice: Thanks, I tried
Code:
command="/sbin/mount >>/tmp/info"
(result: /sbin/mount >>/tmp/info: not found)
and a friend of mine advised me not to use any quotes (in oposite of most documentation I've read)
Code:
command=/sbin/mount >>/tmp/info
result: WORKS!
Andreas, Thanks for your help!
 
Hi!
I just tried your suggestion and it works perfectly!

Much appreciated!


Best regards,
Freddie
 
Back
Top