1
/* $Id: env_check.c 427 2007-03-08 00:09:47Z steve-beattie $ */
3
/* Copyright (C) 2002-2006 Novell/SUSE
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License as
7
* published by the Free Software Foundation, version 2 of the
18
int main(int argc, char *argv[])
20
char *var, *val, *p, *envval;
22
if (argc < 2 || !(p = strchr(argv[1], '='))) {
23
fprintf(stderr, "Usage: %s VAR=value\n", argv[0]);
27
var = strndup(argv[1], p - argv[1]);
32
fprintf(stderr, "FAIL: environment variable not found\n");
36
if (strcmp(envval, val) != 0) {
37
fprintf(stderr, "FAIL: environment variable differs: expected '%s', found '%s'\n",