Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

running something from config file after boot

Help
TC
2011-03-10
2013-05-09
  • TC
    TC
    2011-03-10

    I need to
    1. set variables in the config file which will be avaiable in the booted linux later
    2. run commands/script after bootup thereby setting the command in config file
    How could i mange that? found nothing

     
  • simon1tan
    simon1tan
    2012-02-10

    you can create a share and save the variable into a file. Once linux boots, you can mount and read that file. Maybe there is a way to pass parameters into the initrd. You'll have to do some research or play around.

     
  • Henry N.
    Henry N.
    2012-02-11

    Oh, a very old question.
    Simple set a variable with '=' between, this can read from /proc/cmdline later in Linux.
    For example add "myvar=foo.bar" top the coLinux config file, and you can see it later under running Linux in the /proc/cmdline exactly so as "myvar=foo.bar". You should something do with "sed" to parse it out from file and use it.