[arch-projects] [initscripts][PATCH 0/7] Cleanup and new feature
Hi all, This fixes a couple of items that have been nagging at me, the largest of which being that we parse environment files such as /etc/locale.conf. This is pretty bad, imo, and we shouldn't be doing it. Benefits of not doing it are laid out in the patch that implements it. Tom, I'm not sure when you planned on doing a release, but hopefully some of these are small enough that you won't mind merging them. d Dave Reisner (7): avoid unnecessary escaping of newlines fix non-uniform indentation functions: remove redundant 'return $?' functions: properly quote ${mounts[@]} functions: declare locale vars in an array for reuse functions: implement a environment file parser PKGBUILD: use %Y%m%d format instead of %s PKGBUILD | 2 +- functions | 70 ++++++++++++++++++++++++++++++++++++++++++++++++---------- rc.shutdown | 2 +- rc.sysinit | 16 ++++++------ 4 files changed, 68 insertions(+), 22 deletions(-) -- 1.7.7.2
The bash parser assumes that an expression continues when || is at the
end of a line.
Signed-off-by: Dave Reisner
Signed-off-by: Dave Reisner
Signed-off-by: Dave Reisner
Signed-off-by: Dave Reisner
This also fixes a bug that unintentionally sets LOCALE instead of
just defaulting to a value when its empty.
Signed-off-by: Dave Reisner
This adds a 'parse_envfile' function that reads files such as
/etc/locale.conf and /etc/vconsole.conf without sourcing them as bash
logic. Several benefits are realized from this:
- Impossible to execute arbitrary code
- Bad syntax won't prevent the entire file from being read
- Possible to limit what variables are allowed
Signed-off-by: Dave Reisner
On Mon, Nov 7, 2011 at 11:27 AM, Dave Reisner
ds a 'parse_envfile' function that reads files such as /etc/locale.conf and /etc/vconsole.conf without sourcing them as bash logic. Several benefits are realized from this:
- Impossible to execute arbitrary code - Bad syntax won't prevent the entire file from being read - Possible to limit what variables are allowed
Awesome! -t
Using seconds from epoch will cause 'makepkg -i' to fail. Lame.
Signed-off-by: Dave Reisner
On Mon, Nov 7, 2011 at 11:27 AM, Dave Reisner
Hi all,
This fixes a couple of items that have been nagging at me, the largest of which being that we parse environment files such as /etc/locale.conf. This is pretty bad, imo, and we shouldn't be doing it. Benefits of not doing it are laid out in the patch that implements it.
Tom, I'm not sure when you planned on doing a release, but hopefully some of these are small enough that you won't mind merging them.
I'll merge them all and delay the release. The reason being that your big patch (which I love) correctly restricts what can be in vconsole.conf and locale.conf. Since vconsole.conf is new and locale.conf is almost new, I think it makes sense to include this as soon as possible. Cheers, Tom
participants (2)
-
Dave Reisner
-
Tom Gundersen