[lxc-users] Using template lxc-opensuse: Error in line 266, too many arguments

Johannes Kastl mail at ojkastl.de
Fri May 2 13:44:31 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi everyone,

sorry for the cross-post, not sure where this belongs. Answers to
devel list, please.

I tried to use the lxc-opensuse template, but had this error, which is
easily fixed:

> Checking cache download in /var/cache/lxc/opensuse/rootfs-x86_64
> ... Copy /var/cache/lxc/opensuse/rootfs-x86_64 to
> /var/lib/lxc/openSUSE_lxc_Versuch4/rootfs ... Copying rootfs to
> /var/lib/lxc/openSUSE_lxc_Versuch4/rootfs ... Please change
> root-password ! BAD PASSWORD: it is too short BAD PASSWORD: is too
> simple /usr/share/lxc/templates/lxc-opensuse: line 266: [: too many
> arguments

The problematic line 266 is:
> if [ ! grep -q "^lxc.network.*.gateway" $path/config ]; then

Apparently this creates an error of some kind, which makes trouble
with the test-command.

Changing it to
> if [ ! grep -q "^lxc.network.*.gateway" $path/config 2> /dev/null
> ]; then
solves the problem, at least the script runs without visible errors.

I have no clue what this line should do (had no time to dig...), just
thought I should let you guys know.

System is openSUSE Tumbleweed 64bit, lxc is lxc-1.0.0-124.2.x86_64

Regards,
Johannes
- -- 
When you say "I wrote a program that crashed Windows", people just
stare at you blankly and say "Hey, I got those with the system, *for
free*".
(Linus Torvalds)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/

iEYEARECAAYFAlNjoT8ACgkQzi3gQ/xETbKE6ACdEVKAySrX0PohIOrhgoCIwHve
tuAAn2QYAUSTu4SxfRc/RdnFVPIKjdl5
=uWWk
-----END PGP SIGNATURE-----



More information about the lxc-users mailing list