Skip to content

Commit 57f4fdc

Browse files
committed
CLOUD-57217 do not create home directory and print out version by default
1 parent f777995 commit 57f4fdc

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BINARY=salt-bootstrap
22

3-
VERSION=0.2.2
3+
VERSION=0.3.0
44
BUILD_TIME=$(shell date +%FT%T)
55
LDFLAGS=-ldflags "-X github.com/sequenceiq/salt-bootstrap/saltboot.Version=${VERSION} -X github.com/sequenceiq/salt-bootstrap/saltboot.BuildTime=${BUILD_TIME}"
66

main.go

+1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ func main() {
2424
log.SetOutput(io.MultiWriter(os.Stdout, logFile))
2525

2626
log.Println("[main] Launch salt-bootstrap application")
27+
log.Printf("[main] Version: %s-%s", saltboot.Version, saltboot.BuildTime)
2728
saltboot.NewCloudbreakBootstrapWeb()
2829
}

saltboot/user.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func CreateUser(saltMaster SaltMaster) (resp model.Response, err error) {
4444
if err != nil {
4545
return model.Response{ErrorText: err.Error(), StatusCode: http.StatusInternalServerError}, err
4646
}
47-
result, err = ExecCmd("adduser", "-G", "wheel", "-s", "/sbin/nologin", "--password", hash, SALT_USER)
47+
result, err = ExecCmd("adduser", "--no-create-home", "-G", "wheel", "-s", "/sbin/nologin", "--password", hash, SALT_USER)
4848

4949
if err != nil {
5050
return model.Response{ErrorText: err.Error(), StatusCode: http.StatusInternalServerError}, err

0 commit comments

Comments
 (0)