Lines Matching +full:reboot +full:- +full:mode
87 int doreboot = 0; /* != 0 if reboot required after installation */
90 int ireboot = 0; /* != 0 if immediate reboot required */
92 int warnflag = 0; /* != 0 if non-fatal error has occurred (2) */
118 static int nointeract = 0; /* non-zero - no user interaction */
120 static int pkgverbose = 0; /* non-zero if verbose mode selected */
131 /* Set by -O nozones: do not process any zones */
135 /* Set by -O zonelist=<names...>: process only named zones */
139 /* Set by -O debug: debug output is enabled? */
161 /* printable string - if string is null results in ??? */
167 #if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */
231 * 5 Administration. Interaction is required. Do not use pkgrm -n.
232 * 10 Reboot after removal of all packages.
233 * 20 Reboot after removal of this package.
313 * administra- tion file. in main()
321 * can be found - default is /usr/sadm/install/bin. in main()
337 * Not a public interface: pass -F option to in main()
363 * non-interactive mode. Suppress output of the list of in main()
364 * removed files. The default mode is interactive. in main()
372 * Not a public interface: the -O option allows the behavior in main()
374 * -> debug in main()
375 * ---> enable debugging output in main()
376 * -> nozones in main()
377 * ---> act as though in global zone with no non-global zones in main()
378 * -> enable-hollow-package-support in main()
379 * --> Enable hollow package support. When specified, for any in main()
380 * --> package that has SUNW_PKG_HOLLOW=true: in main()
381 * --> Do not calculate and verify package size against target in main()
382 * --> Do not run any package procedure or class action scripts in main()
383 * --> Do not create or remove any target directories in main()
384 * --> Do not perform any script locking in main()
385 * --> Do not install or uninstall any components of any package in main()
386 * --> Do not output any status or database update messages in main()
387 * -> zonelist="<names...>" in main()
388 * ---> add package to space-separated list of zones only in main()
401 "enable-hollow-package-support") == 0) { in main()
420 if (z_set_zone_spec(p + 9) == -1) in main()
426 /* -O option not recognized - issue warning */ in main()
458 * filesystem using a vfstab-like file of stable format. in main()
469 * debugging the procedural and non- procedural in main()
513 /* set "debug echo" flag according to setting of "-O debug" option */ in main()
526 /* -s cannot be used with several */ in main()
554 /* -V cannot be used with -A */ in main()
562 /* -n used without pkg names or category */ in main()
571 if (usedZoneList && z_verify_zone_spec() == -1) in main()
618 * initialize installation admin parameters - if removing from a spool in main()
628 * if running in the global zone, and non-global zones exist, then in main()
630 * SUNW_PKG_HOLLOW=true will be correctly removed in non-global zones in main()
646 * PSARC 1993-546. -- JST in main()
710 * spool device mounted/available - get the list of the in main()
718 case -1: /* no packages found */ in main()
738 * when error messages are generated - it is referenced directly in main()
756 * package list generated - remove packages in main()
785 * not continuing - quit with 0 exit code in main()
805 * or more non-global zones.
807 * - if != 0 pass -F flag to pkgremove - suppress
812 * - if == 0 do not pass -F flag to pkgremove - all
815 * a_altBinDir - pointer to string representing location of the
817 * the path specified to the -b option to pkgremove.
818 * a_longestPkg - length of the longest package "name" (for
820 * a_adminFile - pointer to string representing the admin
825 * a_zoneAdminFile - pointer to string representing the admin
827 * from a non-global zone only. Typically the admin file
828 * used for non-global zones supresses all checks since
833 * a_zlst - list of zones to process; NULL if no zones to process.
835 * 0 - success
836 * 1 - package operation failed (fatal error)
837 * 2 - non-fatal error (warning)
838 * 3 - user selected quit (operation interrupted)
839 * 4 - admin settings prevented operation
840 * 5 - interaction required and -n (non-interactive) specified
841 * "10" will be added to indicate "immediate reboot required"
842 * "20" will be added to indicate "reboot after install required"
861 /* zone list specified - zone admin file required */ in doRemove()
865 /* no zone list specified - no zone admin file needed */ in doRemove()
880 echoDebug(DBG_DOREMOVE_ARGS, PSTR(pinfo->pkginst), PSTR(pinfo->name), in doRemove()
881 PSTR(pinfo->arch), PSTR(pinfo->version), PSTR(pinfo->basedir), in doRemove()
882 PSTR(pinfo->catg), pinfo->status); in doRemove()
889 (void) snprintf(fmt1, sizeof (fmt1), " %%-%d.%ds %%s", in doRemove()
892 if (pinfo->status == PI_SPOOLED) { in doRemove()
902 echo(fmt1, pinfo->pkginst, pinfo->name); in doRemove()
904 if (pinfo->arch || pinfo->version) { in doRemove()
915 if (pinfo->arch) { in doRemove()
916 (void) fprintf(stderr, "(%s) ", pinfo->arch); in doRemove()
919 if (pinfo->version) { in doRemove()
920 (void) fprintf(stderr, "%s", pinfo->version); in doRemove()
938 if (pinfo->status == PI_SPOOLED) { in doRemove()
1080 * use the admin file passed in by the user via -a. in doRemove()
1099 doreboot = 0; /* != 0 if reboot required after installation (>= 10) */ in resetreturn()
1102 ireboot = 0; /* != 0 if immediate reboot required (>= 20) */ in resetreturn()
1104 warnflag = 0; /* != 0 if non-fatal error has occurred (2) */ in resetreturn()
1134 case 2: /* non-fatal error (warning) */ in ckreturn()
1155 case 5: /* administration: interaction req (no -n) */ in ckreturn()
1220 /* second argument is always: pass -O debug to pkgremove: debug mode */ in pkgZoneCheckRemove()
1223 arg[nargs++] = "-O"; in pkgZoneCheckRemove()
1227 /* pkgrm -b dir: pass -b to pkgremove */ in pkgZoneCheckRemove()
1230 arg[nargs++] = "-b"; in pkgZoneCheckRemove()
1235 * NONABI_SCRIPTS defined: pass -o to pkgremove; refers to a in pkgZoneCheckRemove()
1241 arg[nargs++] = "-o"; in pkgZoneCheckRemove()
1245 * PKG_NONABI_SYMLINKS defined: pass -y to pkgremove; process in pkgZoneCheckRemove()
1250 arg[nargs++] = "-y"; in pkgZoneCheckRemove()
1253 /* pkgrm -M: pass -M to pkgremove: don't mount client file systems */ in pkgZoneCheckRemove()
1255 arg[nargs++] = "-M"; in pkgZoneCheckRemove()
1257 /* pkgrm -A: pass -A to pkgremove */ in pkgZoneCheckRemove()
1260 arg[nargs++] = "-A"; in pkgZoneCheckRemove()
1263 /* pkgrm -v: pass -v to pkgremove: never trace scripts */ in pkgZoneCheckRemove()
1265 /* pass "-O enable-hollow-package-support" */ in pkgZoneCheckRemove()
1268 arg[nargs++] = "-O"; in pkgZoneCheckRemove()
1269 arg[nargs++] = "enable-hollow-package-support"; in pkgZoneCheckRemove()
1272 /* pass -n to pkgremove: always in noninteractive mode */ in pkgZoneCheckRemove()
1274 arg[nargs++] = "-n"; in pkgZoneCheckRemove()
1276 /* pkgrm -a admin: pass -a admin to pkgremove: admin file */ in pkgZoneCheckRemove()
1289 arg[nargs++] = "-a"; in pkgZoneCheckRemove()
1294 * pkgadd -R root: pass -R /a to pkgremove in mounted zone in pkgZoneCheckRemove()
1297 arg[nargs++] = "-R"; in pkgZoneCheckRemove()
1301 /* pkgrm -F: pass -F to pkgremove: always update DB only */ in pkgZoneCheckRemove()
1303 arg[nargs++] = "-F"; in pkgZoneCheckRemove()
1305 /* pass "-O preremovecheck" */ in pkgZoneCheckRemove()
1307 arg[nargs++] = "-O"; in pkgZoneCheckRemove()
1310 /* add "-O addzonename" */ in pkgZoneCheckRemove()
1312 arg[nargs++] = "-O"; in pkgZoneCheckRemove()
1323 "parent-zone-name=%s", p); in pkgZoneCheckRemove()
1324 arg[nargs++] = "-O"; in pkgZoneCheckRemove()
1330 arg[nargs++] = "-O"; in pkgZoneCheckRemove()
1334 "parent-zone-type=%s", in pkgZoneCheckRemove()
1340 "parent-zone-type=%s", in pkgZoneCheckRemove()
1347 arg[nargs++] = "-O"; in pkgZoneCheckRemove()
1350 /* pass -N to pkgremove: program name to report */ in pkgZoneCheckRemove()
1352 arg[nargs++] = "-N"; in pkgZoneCheckRemove()
1374 fds[maxfds] = -1; in pkgZoneCheckRemove()
1389 for (; maxfds > 0; maxfds--) { in pkgZoneCheckRemove()
1390 (void) close(fds[maxfds-1]); in pkgZoneCheckRemove()
1443 /* second argument is always: pass -O debug to pkgremove: debug mode */ in pkgZoneRemove()
1446 arg[nargs++] = "-O"; in pkgZoneRemove()
1450 /* pkgrm -b dir: pass -b to pkgremove */ in pkgZoneRemove()
1453 arg[nargs++] = "-b"; in pkgZoneRemove()
1458 * NONABI_SCRIPTS defined: pass -o to pkgremove; refers to a in pkgZoneRemove()
1464 arg[nargs++] = "-o"; in pkgZoneRemove()
1468 * PKG_NONABI_SYMLINKS defined: pass -y to pkgremove; process in pkgZoneRemove()
1473 arg[nargs++] = "-y"; in pkgZoneRemove()
1476 /* pkgrm -M: pass -M to pkgremove: don't mount client file systems */ in pkgZoneRemove()
1478 arg[nargs++] = "-M"; in pkgZoneRemove()
1480 /* pkgrm -A: pass -A to pkgremove */ in pkgZoneRemove()
1483 arg[nargs++] = "-A"; in pkgZoneRemove()
1486 /* pkgrm -v: pass -v to pkgremove: trace scripts */ in pkgZoneRemove()
1489 arg[nargs++] = "-v"; in pkgZoneRemove()
1492 /* pass "-O enable-hollow-package-support" */ in pkgZoneRemove()
1495 arg[nargs++] = "-O"; in pkgZoneRemove()
1496 arg[nargs++] = "enable-hollow-package-support"; in pkgZoneRemove()
1499 /* pkgrm -n: pass -n to pkgremove: noninteractive mode */ in pkgZoneRemove()
1502 arg[nargs++] = "-n"; in pkgZoneRemove()
1505 /* pkgrm -a admin: pass -a admin to pkgremove: admin file */ in pkgZoneRemove()
1518 arg[nargs++] = "-a"; in pkgZoneRemove()
1523 * pkgadd -R root: pass -R /a to pkgremove in mounted zone in pkgZoneRemove()
1526 arg[nargs++] = "-R"; in pkgZoneRemove()
1530 /* pkgrm -F: pass -F to pkgremove: update DB only */ in pkgZoneRemove()
1533 arg[nargs++] = "-F"; in pkgZoneRemove()
1536 /* add "-O addzonename" */ in pkgZoneRemove()
1538 arg[nargs++] = "-O"; in pkgZoneRemove()
1549 "parent-zone-name=%s", p); in pkgZoneRemove()
1550 arg[nargs++] = "-O"; in pkgZoneRemove()
1556 arg[nargs++] = "-O"; in pkgZoneRemove()
1560 "parent-zone-type=%s", in pkgZoneRemove()
1566 "parent-zone-type=%s", in pkgZoneRemove()
1573 arg[nargs++] = "-O"; in pkgZoneRemove()
1576 /* pass -N to pkgremove: program name to report */ in pkgZoneRemove()
1578 arg[nargs++] = "-N"; in pkgZoneRemove()
1600 fds[maxfds] = -1; in pkgZoneRemove()
1612 for (; maxfds > 0; maxfds--) { in pkgZoneRemove()
1613 (void) close(fds[maxfds-1]); in pkgZoneRemove()
1624 * - if != 0 pass -F flag to pkgremove - suppress
1629 * - if == 0 do not pass -F flag to pkgremove - all
1632 * a_altBinDir - pointer to string representing location of the
1634 * the path specified to the -b option to pkgremove.
1635 * a_adminFile - pointer to string representing the admin
1639 * 0 - success
1640 * 1 - package operation failed (fatal error)
1641 * 2 - non-fatal error (warning)
1642 * 3 - user selected quit (operation interrupted)
1643 * 4 - admin settings prevented operation
1644 * 5 - interaction required and -n (non-interactive) specified
1645 * "10" will be added to indicate "immediate reboot required"
1646 * "20" will be added to indicate "reboot after install required"
1673 /* second argument is always: pass -O debug to pkgremove: debug mode */ in pkgRemove()
1676 arg[nargs++] = "-O"; in pkgRemove()
1682 arg[nargs++] = "-O"; in pkgRemove()
1685 /* pkgrm -b dir: pass -b to pkgremove */ in pkgRemove()
1688 arg[nargs++] = "-b"; in pkgRemove()
1693 * NONABI_SCRIPTS defined: pass -o to pkgremove; refers to a in pkgRemove()
1699 arg[nargs++] = "-o"; in pkgRemove()
1703 * PKG_NONABI_SYMLINKS defined: pass -y to pkgremove; process in pkgRemove()
1708 arg[nargs++] = "-y"; in pkgRemove()
1711 /* pkgrm -M: pass -M to pkgrm: dont mount client file systems */ in pkgRemove()
1714 arg[nargs++] = "-M"; in pkgRemove()
1717 /* pkgrm -A: pass -A to pkgrm */ in pkgRemove()
1720 arg[nargs++] = "-A"; in pkgRemove()
1723 /* pkgrm -v: pass -v to pkgremove: trace scripts */ in pkgRemove()
1726 arg[nargs++] = "-v"; in pkgRemove()
1729 /* pkgrm -n: pass -n to pkgremove: noninteractive mode */ in pkgRemove()
1732 arg[nargs++] = "-n"; in pkgRemove()
1735 /* pkgrm -a admin: pass -a admin to pkgremove: admin file */ in pkgRemove()
1738 arg[nargs++] = "-a"; in pkgRemove()
1742 /* pkgrm -V vfstab: pass -V vfstab to pkgremove: alternate vfstab */ in pkgRemove()
1745 arg[nargs++] = "-V"; in pkgRemove()
1749 /* pkgrm -R root: pass -R root to pkgremove: alternative root */ in pkgRemove()
1752 arg[nargs++] = "-R"; in pkgRemove()
1756 /* pkgrm -F: pass -F to pkgremove: update DB only */ in pkgRemove()
1759 arg[nargs++] = "-F"; in pkgRemove()
1770 "parent-zone-name=%s", p); in pkgRemove()
1771 arg[nargs++] = "-O"; in pkgRemove()
1777 arg[nargs++] = "-O"; in pkgRemove()
1781 "parent-zone-type=%s", in pkgRemove()
1787 "parent-zone-type=%s", in pkgRemove()
1792 /* pass -N to pkgremove: program name to report */ in pkgRemove()
1794 arg[nargs++] = "-N"; in pkgRemove()
1836 * Description: Remove packages from the global zone and from non-global zones
1837 * when run from the global zone and when non-global zones are
1839 * Arguments: a_pkgList - pointer to array of strings, each string specifying
1842 * - if != 0 pass -F flag to pkgremove - suppress
1847 * - if == 0 do not pass -F flag to pkgremove - all
1850 * a_longestPkg - length of the longest package "name" (for
1852 * a_repeat - are there more packages avialable in "optind"
1853 * - B_TRUE - process packages from optind
1854 * - B_FALSE - do not process packages from optind
1855 * a_altBinDir - pointer to string representing location of the
1857 * the path specified to the -b option to pkgremove.
1858 * a_pkgdir - pointer to string representing the directory
1860 * a_zlst - list of zones to process; NULL if no zones to process.
1862 * 0 - success
1863 * 1 - package operation failed (fatal error)
1864 * 2 - non-fatal error (warning)
1865 * 3 - user selected quit (operation interrupted)
1866 * 4 - admin settings prevented operation
1867 * 5 - interaction required and -n (non-interactive) specified
1868 * "10" will be added to indicate "immediate reboot required"
1869 * "20" will be added to indicate "reboot after install required"
1914 /* create hands off settings admin file for use in a non-global zone */ in remove_packages_in_global_with_zones()
1920 * removed one at a time from all non-global zones and then in remove_packages_in_global_with_zones()
1937 * non-global zones in remove_packages_in_global_with_zones()
2078 npkgs--; in remove_packages_in_global_with_zones()
2082 * look at all pre-remove check files in remove_packages_in_global_with_zones()
2123 * non-global zones configured: in remove_packages_in_global_with_zones()
2134 /* global zone and non-global zones */ in remove_packages_in_global_with_zones()
2143 npkgs--; in remove_packages_in_global_with_zones()
2149 * -- immediate reboot is NOT required in remove_packages_in_global_with_zones()
2150 * -- there are more packages to remove in remove_packages_in_global_with_zones()
2165 * Description: Remove packages in a non-global zone when run from a
2166 * non-global zone.
2167 * Arguments: a_pkgList - pointer to array of strings, each string specifying
2170 * - if != 0 pass -F flag to pkgremove - suppress
2175 * - if == 0 do not pass -F flag to pkgremove - all
2178 * a_longestPkg - length of the longest package "name" (for
2180 * a_repeat - are there more packages avialable in "optind"
2181 * - B_TRUE - process packages from optind
2182 * - B_FALSE - do not process packages from optind
2183 * a_altBinDir - pointer to string representing location of the
2185 * the path specified to the -b option to pkgremove.
2186 * a_pkgdir - pointer to string representing the directory
2189 * 0 - success
2190 * 1 - package operation failed (fatal error)
2191 * 2 - non-fatal error (warning)
2192 * 3 - user selected quit (operation interrupted)
2193 * 4 - admin settings prevented operation
2194 * 5 - interaction required and -n (non-interactive) specified
2195 * "10" will be added to indicate "immediate reboot required"
2196 * "20" will be added to indicate "reboot after install required"
2231 /* create hands off settings admin file for use in a non-global zone */ in remove_packages_in_nonglobal_zone()
2251 * pkgrm invoked from within a non-global zone: remove in remove_packages_in_nonglobal_zone()
2252 * the package from the current zone only - no non-global in remove_packages_in_nonglobal_zone()
2263 npkgs--; in remove_packages_in_nonglobal_zone()
2269 * -- immediate reboot is NOT required in remove_packages_in_nonglobal_zone()
2270 * -- there are more packages to remove in remove_packages_in_nonglobal_zone()
2286 * global zone and no non-global zones are installed.
2287 * Arguments: a_pkgList - pointer to array of strings, each string specifying
2290 * - if != 0 pass -F flag to pkgremove - suppress
2295 * - if == 0 do not pass -F flag to pkgremove - all
2298 * a_longestPkg - length of the longest package "name" (for
2300 * a_repeat - are there more packages avialable in "optind"
2301 * - B_TRUE - process packages from optind
2302 * - B_FALSE - do not process packages from optind
2303 * a_altBinDir - pointer to string representing location of the
2305 * the path specified to the -b option to pkgremove.
2307 * 0 - success
2308 * 1 - package operation failed (fatal error)
2309 * 2 - non-fatal error (warning)
2310 * 3 - user selected quit (operation interrupted)
2311 * 4 - admin settings prevented operation
2312 * 5 - interaction required and -n (non-interactive) specified
2313 * "10" will be added to indicate "immediate reboot required"
2314 * "20" will be added to indicate "reboot after install required"
2352 * NO non-global zones configured: in remove_packages_in_global_no_zones()
2363 npkgs--; in remove_packages_in_global_no_zones()
2369 * -- immediate reboot is NOT required in remove_packages_in_global_no_zones()
2370 * -- there are more packages to remove in remove_packages_in_global_no_zones()
2386 * Arguments: a_pkgList - pointer to array of strings, each string specifying
2389 * - if != 0 pass -F flag to pkgremove - suppress
2394 * - if == 0 do not pass -F flag to pkgremove - all
2397 * a_longestPkg - length of the longest package "name" (for
2399 * a_repeat - are there more packages avialable in "optind"
2400 * - B_TRUE - process packages from optind
2401 * - B_FALSE - do not process packages from optind
2402 * a_altBinDir - pointer to string representing location of the
2404 * the path specified to the -b option to pkgremove.
2406 * 0 - success
2407 * 1 - package operation failed (fatal error)
2408 * 2 - non-fatal error (warning)
2409 * 3 - user selected quit (operation interrupted)
2410 * 4 - admin settings prevented operation
2411 * 5 - interaction required and -n (non-interactive) specified
2412 * "10" will be added to indicate "immediate reboot required"
2413 * "20" will be added to indicate "reboot after install required"
2456 npkgs--; in remove_packages_from_spool_directory()
2462 * -- immediate reboot is NOT required in remove_packages_from_spool_directory()
2463 * -- there are more packages to remove in remove_packages_from_spool_directory()
2479 * or more non-global zones, or from a specified spool directory.
2480 * Arguments: a_pkgList - pointer to array of strings, each string specifying
2483 * - if != 0 pass -F flag to pkgremove - suppress
2488 * - if == 0 do not pass -F flag to pkgremove - all
2491 * a_longestPkg - length of the longest package "name" (for
2493 * a_repeat - are there more packages avialable in "optind"
2494 * - B_TRUE - process packages from optind
2495 * - B_FALSE - do not process packages from optind
2496 * a_altBinDir - pointer to string representing location of the
2498 * the path specified to the -b option to pkgremove.
2499 * a_pkgdir - pointer to string representing the directory
2501 * a_spoolDir - pointer to string specifying spool directory
2505 * a_noZones - if non-global zones are configured, should the
2506 * packages be removed from the non-global zones?
2507 * - B_TRUE - do NOT remove packages from non-global zones
2508 * - B_FALSE - remove packages from non-global zones
2510 * 0 - success
2511 * 1 - package operation failed (fatal error)
2512 * 2 - non-fatal error (warning)
2513 * 3 - user selected quit (operation interrupted)
2514 * 4 - admin settings prevented operation
2515 * 5 - interaction required and -n (non-interactive) specified
2516 * "10" will be added to indicate "immediate reboot required"
2517 * "20" will be added to indicate "reboot after install required"
2541 /* in non-global zone */ in remove_packages()
2559 * if running in the global zone AND one or more non-global in remove_packages()
2561 * add packages in the standard 'non-zones aware' manner. in remove_packages()
2565 /* in non-global zone */ in remove_packages()
2592 /* get a list of all non-global zones */ in remove_packages()
2621 /* free list of all non-global zones */ in remove_packages()
2628 /* in global zone no non-global zones */ in remove_packages()
2677 npkgs--; in check_packages()
2685 * - is this package removable from this zone?
2686 * - does the scope of remove conflict with existing installation
2714 * if not installed return success - operation will fail in check_applicability()
2793 * Returns: B_TRUE - continue processing with next package
2794 * B_FALSE - do not continue processing with next package
2803 /* return FALSE if immediate reboot required */ in shall_we_continue()
2820 /* if running with no interaction (-n) do not ask question */ in shall_we_continue()
2846 * can be used to perform "non-interactive" operations in a
2847 * non-global zone.
2848 * Arguments: r_zoneAdminFile - pointer to handle that will contain a
2850 * administration file created - this must be NULL
2851 * before the first call to this function - on
2854 * a_zoneTempDir - pointer to string representing the path
2857 * a_admnfile - pointer to string representing the path to
2858 * an existing "user" administration file - the
2912 * Arguments: r_zoneTempDir - pointer to handle that will contain a
2914 * directory created - this must be NULL before the
2915 * first call to this function - on subsequent calls
2918 * a_zoneTempDir - pointer to string representing the path