Changeset 2113 in MondoRescue
- Timestamp:
- Jan 10, 2009, 5:51:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.8/mondo/src/mondoarchive/mondoarchive.c
r2053 r2113 181 181 { 182 182 char *tmp; 183 char *tmp1 = NULL; 183 184 int res, retval; 184 185 char *say_at_end; … … 219 220 220 221 /* make sure PATH environmental variable allows access to mkfs, fdisk, etc. */ 221 strncpy(tmp, getenv("PATH"), MAX_STR_LEN - 1); 222 tmp[MAX_STR_LEN - 1] = '\0'; 223 if (strlen(tmp) >= MAX_STR_LEN - 33) { 224 fatal_error 225 ("Your PATH environmental variable is too long. Please shorten it."); 226 } 227 strcat(tmp, ":/sbin:/usr/sbin:/usr/local/sbin"); 228 setenv("PATH", tmp, 1); 222 asprintf(&tmp1,"%s:/sbin:/usr/sbin:/usr/local/sbin",getenv("PATH")); 223 setenv("PATH", tmp1, 1); 224 paranoid_free(tmp1); 229 225 230 226 /* Add the ARCH environment variable for ia64 purposes */ 231 strncpy(tmp, get_architecture(), MAX_STR_LEN - 1);232 tmp[MAX_STR_LEN - 1] = '\0';233 setenv("ARCH", tmp,1);227 asprintf(&tmp1,"%s",get_architecture()); 228 setenv("ARCH", tmp1, 1); 229 paranoid_free(tmp1); 234 230 235 231 /* Add MONDO_SHARE environment variable for mindi */
Note:
See TracChangeset
for help on using the changeset viewer.