|
@@ -32,8 +32,8 @@ lxc.pts = 1024
|
|
|
lxc.console = none
|
|
|
{{if .ProcessLabel}}
|
|
|
lxc.se_context = {{ .ProcessLabel}}
|
|
|
-{{$MOUNTLABEL := .MountLabel}}
|
|
|
{{end}}
|
|
|
+{{$MOUNTLABEL := .MountLabel}}
|
|
|
|
|
|
# no controlling tty at all
|
|
|
lxc.tty = 1
|
|
@@ -94,8 +94,8 @@ lxc.mount.entry = sysfs {{escapeFstabSpaces $ROOTFS}}/sys sysfs nosuid,nodev,noe
|
|
|
lxc.mount.entry = {{.Console}} {{escapeFstabSpaces $ROOTFS}}/dev/console none bind,rw 0 0
|
|
|
{{end}}
|
|
|
|
|
|
-lxc.mount.entry = devpts {{escapeFstabSpaces $ROOTFS}}/dev/pts devpts {{formatMountLabel "newinstance,ptmxmode=0666,nosuid,noexec" "$MOUNTLABEL"}} 0 0
|
|
|
-lxc.mount.entry = shm {{escapeFstabSpaces $ROOTFS}}/dev/shm tmpfs {{formatMountLabel "size=65536k,nosuid,nodev,noexec" "$MOUNTLABEL"}} 0 0
|
|
|
+lxc.mount.entry = devpts {{escapeFstabSpaces $ROOTFS}}/dev/pts devpts {{formatMountLabel "newinstance,ptmxmode=0666,nosuid,noexec" $MOUNTLABEL}} 0 0
|
|
|
+lxc.mount.entry = shm {{escapeFstabSpaces $ROOTFS}}/dev/shm tmpfs {{formatMountLabel "size=65536k,nosuid,nodev,noexec" $MOUNTLABEL}} 0 0
|
|
|
|
|
|
{{range $value := .Mounts}}
|
|
|
{{if $value.Writable}}
|
|
@@ -151,14 +151,6 @@ func getMemorySwap(v *execdriver.Resources) int64 {
|
|
|
return v.Memory * 2
|
|
|
}
|
|
|
|
|
|
-func getProcessLabel(c map[string][]string) string {
|
|
|
- return getLabel(c, "process")
|
|
|
-}
|
|
|
-
|
|
|
-func getMountLabel(c map[string][]string) string {
|
|
|
- return getLabel(c, "mount")
|
|
|
-}
|
|
|
-
|
|
|
func getLabel(c map[string][]string, name string) string {
|
|
|
label := c["label"]
|
|
|
for _, l := range label {
|
|
@@ -174,8 +166,6 @@ func init() {
|
|
|
var err error
|
|
|
funcMap := template.FuncMap{
|
|
|
"getMemorySwap": getMemorySwap,
|
|
|
- "getProcessLabel": getProcessLabel,
|
|
|
- "getMountLabel": getMountLabel,
|
|
|
"escapeFstabSpaces": escapeFstabSpaces,
|
|
|
"formatMountLabel": label.FormatMountLabel,
|
|
|
}
|