finaly added /usr/bin/bash as default to cnt exec
This commit is contained in:
@@ -18,9 +18,6 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
|
||||
containerName := args[0]
|
||||
var allargs []string
|
||||
if len(args) == 1 {
|
||||
allargs = append(allargs, "/usr/bin/bash")
|
||||
}
|
||||
|
||||
if !container.ValidSource(containerName) {
|
||||
wwlog.Printf(wwlog.ERROR, "Unknown Warewulf container: %s\n", containerName)
|
||||
@@ -31,6 +28,9 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
allargs = append(allargs, "--bind", b)
|
||||
}
|
||||
allargs = append(allargs, args...)
|
||||
if len(args) == 1 {
|
||||
allargs = append(allargs, "/usr/bin/bash")
|
||||
}
|
||||
|
||||
c := exec.Command("/proc/self/exe", append([]string{"container", "exec", "__child"}, allargs...)...)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user