Blame SOURCES/0001-feat-default-config-file-location.patch
|
|
dc8925 |
--- main.go.orig 2022-02-11 15:41:53.199642591 -0500
|
|
|
dc8925 |
+++ main.go 2022-02-11 15:42:43.738219604 -0500
|
|
|
dc8925 |
@@ -6,6 +6,7 @@
|
|
|
dc8925 |
"fmt"
|
|
|
dc8925 |
"net"
|
|
|
dc8925 |
"os"
|
|
|
dc8925 |
+ "path/filepath"
|
|
|
dc8925 |
"strconv"
|
|
|
dc8925 |
"strings"
|
|
|
dc8925 |
"time"
|
|
|
dc8925 |
@@ -21,7 +22,7 @@
|
|
|
dc8925 |
)
|
|
|
dc8925 |
|
|
|
dc8925 |
func main() {
|
|
|
dc8925 |
- fs := flag.NewFlagSet("yggd-package-manager-worker", flag.ExitOnError)
|
|
|
dc8925 |
+ fs := flag.NewFlagSet(filepath.Base(os.Args[0]), flag.ExitOnError)
|
|
|
dc8925 |
|
|
|
dc8925 |
var (
|
|
|
dc8925 |
socketAddr = ""
|
|
|
dc8925 |
@@ -32,7 +33,7 @@
|
|
|
dc8925 |
fs.StringVar(&socketAddr, "socket-addr", "", "dispatcher socket address")
|
|
|
dc8925 |
fs.Var(&logLevel, "log-level", "log verbosity level (error (default), warn, info, debug, trace)")
|
|
|
dc8925 |
fs.Var(&allowPatterns, "allow-pattern", "regular expression pattern to allow package operations\n(can be specified multiple times)")
|
|
|
dc8925 |
- _ = fs.String("config", "", "path to `file` containing configuration values (optional)")
|
|
|
dc8925 |
+ _ = fs.String("config", filepath.Join("etc", "rhc", "workers", fs.Name()+".toml"), "path to `file` containing configuration values (optional)")
|
|
|
dc8925 |
|
|
|
dc8925 |
ff.Parse(fs, os.Args[1:], ff.WithEnvVarPrefix("YGG"), ff.WithConfigFileFlag("config"), ff.WithConfigFileParser(fftoml.Parser))
|
|
|
dc8925 |
|