Deleted Added
full compact
main.c (236333) main.c (240682)
1/*
2 *
3 * FreeBSD install - a package for the installation and maintenance
4 * of non-core utilities.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 5 unchanged lines hidden (view full) ---

14 *
15 * Jordan K. Hubbard
16 * 18 July 1993
17 *
18 * This is the add module.
19 */
20
21#include <sys/cdefs.h>
1/*
2 *
3 * FreeBSD install - a package for the installation and maintenance
4 * of non-core utilities.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 5 unchanged lines hidden (view full) ---

14 *
15 * Jordan K. Hubbard
16 * 18 July 1993
17 *
18 * This is the add module.
19 */
20
21#include <sys/cdefs.h>
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/add/main.c 236333 2012-05-30 21:01:06Z jpaetzel $");
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/add/main.c 240682 2012-09-18 22:09:23Z bapt $");
23
24#include <sys/param.h>
25#include <sys/sysctl.h>
26#include <err.h>
27#include <getopt.h>
28
29#include "lib.h"
30#include "add.h"

--- 252 unchanged lines hidden (view full) ---

283 usage();
284 }
285 else if (ch > 1 && AddMode == MASTER) {
286 warnx("only one package name may be specified with master mode");
287 usage();
288 }
289 /* Perform chroot if requested */
290 if (Chroot != NULL) {
23
24#include <sys/param.h>
25#include <sys/sysctl.h>
26#include <err.h>
27#include <getopt.h>
28
29#include "lib.h"
30#include "add.h"

--- 252 unchanged lines hidden (view full) ---

283 usage();
284 }
285 else if (ch > 1 && AddMode == MASTER) {
286 warnx("only one package name may be specified with master mode");
287 usage();
288 }
289 /* Perform chroot if requested */
290 if (Chroot != NULL) {
291 if (chroot(Chroot))
291 if (chdir(Chroot))
292 errx(1, "chdir to %s failed", Chroot);
293 if (chroot("."))
292 errx(1, "chroot to %s failed", Chroot);
293 }
294 /* Make sure the sub-execs we invoke get found */
295 setenv("PATH",
296 "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin",
297 1);
298
299 /* Set a reasonable umask */

--- 72 unchanged lines hidden ---
294 errx(1, "chroot to %s failed", Chroot);
295 }
296 /* Make sure the sub-execs we invoke get found */
297 setenv("PATH",
298 "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin",
299 1);
300
301 /* Set a reasonable umask */

--- 72 unchanged lines hidden ---