FIXME: Update Last_started
This commit is contained in:
parent
89db166040
commit
54fd1f8064
10
cmd/start.go
10
cmd/start.go
@ -4,6 +4,7 @@ import (
|
||||
"os"
|
||||
"fmt"
|
||||
"net"
|
||||
"time"
|
||||
"errors"
|
||||
"regexp"
|
||||
"reflect"
|
||||
@ -945,7 +946,7 @@ func setupVnetInterfaceJailSide(jail *Jail, hsepair string) error {
|
||||
// Get bridge MTU
|
||||
mtu, err := gJailHost.GetBridgeMTU(bridge)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error getting bridge mtu: %v\n", err)
|
||||
return fmt.Errorf("Error getting bridge %s mtu: %v\n", bridge, err)
|
||||
}
|
||||
|
||||
cmd = fmt.Sprintf("/usr/sbin/jexec %d ifconfig %s mtu %d", jail.JID, jsepair, mtu)
|
||||
@ -1309,7 +1310,7 @@ func StartJail(args []string) {
|
||||
}
|
||||
|
||||
// Synchronize jail config to disk
|
||||
WriteConfigToDisk(false)
|
||||
WriteConfigToDisk(cj.Name, false, false)
|
||||
|
||||
start_cmd := fmt.Sprintf("/usr/sbin/jail -f /var/run/jail.%s.conf -c", cj.InternalName)
|
||||
|
||||
@ -1455,6 +1456,11 @@ func StartJail(args []string) {
|
||||
// TODO: Handle dhcp
|
||||
// TODO: Apply rctl
|
||||
|
||||
// Update last_started
|
||||
dt := time.Now()
|
||||
curDate := fmt.Sprintf("%s", dt.Format("2006-01-02 15:04:05"))
|
||||
fmt.Sprintf(cj.Config.Last_started, curDate)
|
||||
WriteConfigToDisk(cj.Name, false, true)
|
||||
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user