confile: lxc.pts --> lxc.pty.max

parent fe1c5887
......@@ -4,7 +4,7 @@
lxc.tty.dir = lxc
# Allow for 1024 pseudo terminals
lxc.pts = 1024
lxc.pty.max = 1024
# Setup 4 tty devices
lxc.tty.max = 4
......
# Default console settings
lxc.tty.dir = lxc
lxc.tty.max = 4
lxc.pts = 1024
lxc.pty.max = 1024
# Default capabilities
lxc.cap.drop = mac_admin
......
......@@ -4,7 +4,7 @@
lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed
# Allow for 1024 pseudo terminals
lxc.pts = 1024
lxc.pty.max = 1024
# Setup 1 tty devices for lxc-console command
lxc.tty.max = 1
......
......@@ -650,7 +650,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<variablelist>
<varlistentry>
<term>
<option>lxc.pts</option>
<option>lxc.pty.max</option>
</term>
<listitem>
<para>
......
......@@ -75,7 +75,7 @@ lxc_log_define(lxc_confile, lxc);
lxc_config_define(personality);
lxc_config_define(pts);
lxc_config_define(pty_max);
lxc_config_define(tty_max);
lxc_config_define(tty_dir);
lxc_config_define(apparmor_profile);
......@@ -135,11 +135,16 @@ lxc_config_define(prlimit);
static struct lxc_config_t config[] = {
{ "lxc.arch", set_config_personality, get_config_personality, clr_config_personality, },
{ "lxc.pts", set_config_pts, get_config_pts, clr_config_pts, },
{ "lxc.pty.max", set_config_pty_max, get_config_pty_max, clr_config_pty_max, },
{ "lxc.tty.dir", set_config_tty_dir, get_config_tty_dir, clr_config_tty_dir, },
{ "lxc.tty.max", set_config_tty_max, get_config_tty_max, clr_config_tty_max, },
/* REMOVE IN LXC 3.0
legacy pts key
*/
{ "lxc.pts", set_config_pty_max, get_config_pty_max, clr_config_pty_max, },
/* REMOVE IN LXC 3.0
legacy devttydir key
*/
{ "lxc.devttydir", set_config_tty_dir, get_config_tty_dir, clr_config_tty_dir, },
......@@ -1162,8 +1167,8 @@ static int set_config_personality(const char *key, const char *value,
return 0;
}
static int set_config_pts(const char *key, const char *value,
struct lxc_conf *lxc_conf, void *data)
static int set_config_pty_max(const char *key, const char *value,
struct lxc_conf *lxc_conf, void *data)
{
/* Set config value to default. */
if (lxc_config_value_empty(value)) {
......@@ -2794,8 +2799,8 @@ static int get_config_personality(const char *key, char *retv, int inlen,
return fulllen;
}
static int get_config_pts(const char *key, char *retv, int inlen,
struct lxc_conf *c, void *data)
static int get_config_pty_max(const char *key, char *retv, int inlen,
struct lxc_conf *c, void *data)
{
return lxc_get_conf_int(c, retv, inlen, c->pts);
}
......@@ -3366,8 +3371,8 @@ static inline int clr_config_personality(const char *key, struct lxc_conf *c,
return 0;
}
static inline int clr_config_pts(const char *key, struct lxc_conf *c,
void *data)
static inline int clr_config_pty_max(const char *key, struct lxc_conf *c,
void *data)
{
c->pts = 0;
return 0;
......
......@@ -300,13 +300,22 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* lxc.pts */
/* REMOVE IN LXC 3.0
legacy ps keys
*/
if (set_get_compare_clear_save_load(c, "lxc.pts", "1000", tmpf, true) <
0) {
lxc_error("%s\n", "lxc.pts");
goto non_test_error;
}
/* lxc.pty.max */
if (set_get_compare_clear_save_load(c, "lxc.pty.max", "1000", tmpf, true) <
0) {
lxc_error("%s\n", "lxc.pty.max");
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy tty.max keys
*/
......
......@@ -278,7 +278,7 @@ copy_configuration()
cat <<EOF >> $config_path/config
lxc.uts.name = $name
lxc.tty.max = 4
lxc.pts = 1024
lxc.pty.max = 1024
lxc.cap.drop = sys_module mac_admin mac_override sys_time
# When using LXC with apparmor, uncomment the next line to run unconfined:
......
......@@ -345,7 +345,7 @@ lxc.signal.halt = SIGUSR1
lxc.rebootsignal = SIGTERM
lxc.uts.name = $name
lxc.tty.max = 1
lxc.pts = 1
lxc.pty.max = 1
lxc.cap.drop = sys_module mac_admin mac_override sys_time
# When using LXC with apparmor, uncomment the next line to run unconfined:
......
......@@ -121,7 +121,7 @@ cat >> "$path/config" <<EOF
lxc.rootfs.path = $rootfs
lxc.tty.max = 4
lxc.pts = 1024
lxc.pty.max = 1024
lxc.uts.name = $name
lxc.arch = $arch
......
......@@ -517,7 +517,7 @@ copy_configuration()
lxc.tty.max = $num_tty
lxc.uts.name = $hostname
lxc.arch = $arch
lxc.pts=1023
lxc.pty.max = 1024
EOF
if [ $? -ne 0 ]; then
......
......@@ -230,7 +230,7 @@ copy_configuration()
cat <<EOF >> $config_path/config
lxc.uts.name = $name
lxc.tty.max = 4
lxc.pts = 1024
lxc.pty.max = 1024
lxc.cap.drop = sys_module mac_admin mac_override sys_time
lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed
......
......@@ -240,7 +240,7 @@ copy_configuration()
# lxc.include = /usr/share/lxc/config/common.conf
lxc.uts.name = $utsname
lxc.tty.max = 4
lxc.pts = 1024
lxc.pty.max = 1024
# Consider if below line is right for systemd container
lxc.mount.fstab = $config_path/fstab
lxc.cap.drop = sys_module mac_admin mac_override sys_time
......
......@@ -130,7 +130,7 @@ copy_configuration()
grep -q "^lxc.rootfs.path" $path/config 2>/dev/null || echo "lxc.rootfs.path = $rootfs" >> $path/config
cat <<EOF >> $path/config
lxc.uts.name = $name
lxc.pts = 1024
lxc.pty.max = 1024
lxc.cap.drop = sys_module mac_admin mac_override sys_time
# When using LXC with apparmor, uncomment the next line to run unconfined:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment