> I'm trying to make a minimal set of boot services for alpine

I would be interested in the results. Is there simething like a repository?

>   if { @YELL_INFO@ hostname setting hostname }
>
>   if -nt {
>     backtick opts {
>       ifelse { test -s /etc/hostname }
>       { echo "-F /etc/hostname" }

You probably want to use -F/etc/hostname instead here. There is no
argument splitting by default in execline so this will be read as the
file name ' /etc/hostname' (notice the leading space). And you can remove
the quotes then.

>       importas -uD localhost hostname hostname
>       echo $hostname
>     }
>
>     importas -ui opts opts
>     hostname $opts
>   }
>
>   @YELL_ERROR@ hostname crashed!

When you are ok with having a hostname call in 2 different locations the
logic can be simplified like this (+ logging wrapper):

ifelse { test -s /etc/hostname } {
  hostname -F /etc/hostname
}
importas -uD localhost hostname hostname
hostname $hostname

Reply via email to