head	1.346;
access;
symbols
	RELENG_8_4:1.345.0.2
	RELENG_9_1_0_RELEASE:1.343.2.2.2.2
	RELENG_9_1:1.343.2.2.0.2
	RELENG_9_1_BP:1.343.2.2
	RELENG_8_3_0_RELEASE:1.342.2.2.2.1
	RELENG_8_3:1.342.2.2.0.2
	RELENG_8_3_BP:1.342.2.2
	RELENG_9_0_0_RELEASE:1.343.2.1.2.1
	RELENG_9_0:1.343.2.1.0.2
	RELENG_9_0_BP:1.343.2.1
	RELENG_9:1.343.0.2
	RELENG_9_BP:1.343
	RELENG_7_4_0_RELEASE:1.340.2.1.2.1
	RELENG_8_2_0_RELEASE:1.342.2.1.6.1
	RELENG_7_4:1.340.2.1.0.2
	RELENG_7_4_BP:1.340.2.1
	RELENG_8_2:1.342.2.1.0.6
	RELENG_8_2_BP:1.342.2.1
	RELENG_8_1_0_RELEASE:1.342.2.1.4.1
	RELENG_8_1:1.342.2.1.0.4
	RELENG_8_1_BP:1.342.2.1
	RELENG_7_3_0_RELEASE:1.340.10.1
	RELENG_7_3:1.340.0.10
	RELENG_7_3_BP:1.340
	RELENG_8_0_0_RELEASE:1.342.2.1.2.1
	RELENG_8_0:1.342.2.1.0.2
	RELENG_8_0_BP:1.342.2.1
	RELENG_8:1.342.0.2
	RELENG_8_BP:1.342
	RELENG_7_2_0_RELEASE:1.340.8.1
	RELENG_7_2:1.340.0.8
	RELENG_7_2_BP:1.340
	RELENG_7_1_0_RELEASE:1.340.6.1
	RELENG_6_4_0_RELEASE:1.336.2.3.4.1
	RELENG_7_1:1.340.0.6
	RELENG_7_1_BP:1.340
	RELENG_6_4:1.336.2.3.0.4
	RELENG_6_4_BP:1.336.2.3
	RELENG_7_0_0_RELEASE:1.340
	RELENG_6_3_0_RELEASE:1.336.2.3
	RELENG_7_0:1.340.0.4
	RELENG_7_0_BP:1.340
	RELENG_6_3:1.336.2.3.0.2
	RELENG_6_3_BP:1.336.2.3
	RELENG_7:1.340.0.2
	RELENG_7_BP:1.340
	RELENG_6_2_0_RELEASE:1.336.2.2
	RELENG_6_2:1.336.2.2.0.4
	RELENG_6_2_BP:1.336.2.2
	RELENG_5_5_0_RELEASE:1.333.2.1
	RELENG_5_5:1.333.2.1.0.6
	RELENG_5_5_BP:1.333.2.1
	RELENG_6_1_0_RELEASE:1.336.2.2
	RELENG_6_1:1.336.2.2.0.2
	RELENG_6_1_BP:1.336.2.2
	RELENG_6_0_0_RELEASE:1.336
	RELENG_6_0:1.336.0.4
	RELENG_6_0_BP:1.336
	RELENG_6:1.336.0.2
	RELENG_6_BP:1.336
	RELENG_5_4_0_RELEASE:1.333.2.1
	RELENG_5_4:1.333.2.1.0.4
	RELENG_5_4_BP:1.333.2.1
	RELENG_4_11_0_RELEASE:1.212.2.51.8.1
	RELENG_4_11:1.212.2.51.0.8
	RELENG_4_11_BP:1.212.2.51
	RELENG_5_3_0_RELEASE:1.333.2.1
	RELENG_5_3:1.333.2.1.0.2
	RELENG_5_3_BP:1.333.2.1
	RELENG_5:1.333.0.2
	RELENG_5_BP:1.333
	RELENG_4_10_0_RELEASE:1.212.2.51
	RELENG_4_10:1.212.2.51.0.6
	RELENG_4_10_BP:1.212.2.51
	RELENG_5_2_1_RELEASE:1.329
	RELENG_5_2_0_RELEASE:1.329
	RELENG_5_2:1.329.0.4
	RELENG_5_2_BP:1.329
	RELENG_4_9_0_RELEASE:1.212.2.51
	RELENG_4_9:1.212.2.51.0.4
	RELENG_4_9_BP:1.212.2.51
	RELENG_5_1_0_RELEASE:1.329
	RELENG_5_1:1.329.0.2
	RELENG_5_1_BP:1.329
	RELENG_4_8_0_RELEASE:1.212.2.51
	RELENG_4_8:1.212.2.51.0.2
	RELENG_4_8_BP:1.212.2.51
	RELENG_5_0_0_RELEASE:1.323
	RELENG_5_0:1.323.0.2
	RELENG_5_0_BP:1.323
	RELENG_4_7_0_RELEASE:1.212.2.50
	RELENG_4_7:1.212.2.50.0.4
	RELENG_4_7_BP:1.212.2.50
	RELENG_4_6_2_RELEASE:1.212.2.50
	RELENG_4_6_1_RELEASE:1.212.2.50
	RELENG_4_6_0_RELEASE:1.212.2.50
	RELENG_4_6:1.212.2.50.0.2
	RELENG_4_6_BP:1.212.2.50
	RELENG_4_5_0_RELEASE:1.212.2.38
	RELENG_4_5:1.212.2.38.0.2
	RELENG_4_5_BP:1.212.2.38
	RELENG_4_4_0_RELEASE:1.212.2.34
	RELENG_4_4:1.212.2.34.0.2
	RELENG_4_4_BP:1.212.2.34
	head_20010615:1.1.1.2
	NETBSD:1.1.1
	RELENG_4_3_0_RELEASE:1.212.2.23
	RELENG_4_3:1.212.2.23.0.2
	RELENG_4_3_BP:1.212.2.23
	RELENG_4_2_0_RELEASE:1.212.2.8
	RELENG_4_1_1_RELEASE:1.212.2.7
	PRE_SMPNG:1.230
	RELENG_4_1_0_RELEASE:1.212.2.4
	RELENG_3_5_0_RELEASE:1.169.2.21
	RELENG_4_0_0_RELEASE:1.212
	RELENG_4:1.212.0.2
	RELENG_4_BP:1.212
	RELENG_3_4_0_RELEASE:1.169.2.18
	RELENG_3_3_0_RELEASE:1.169.2.17
	RELENG_3_2_PAO:1.169.2.11.0.2
	RELENG_3_2_PAO_BP:1.169.2.11
	RELENG_3_2_0_RELEASE:1.169.2.11
	RELENG_3_1_0_RELEASE:1.169.2.5
	RELENG_3:1.169.0.2
	RELENG_3_BP:1.169
	RELENG_2_2_8_RELEASE:1.104.2.38
	RELENG_3_0_0_RELEASE:1.160
	RELENG_2_2_7_RELEASE:1.104.2.34
	RELENG_2_2_6_RELEASE:1.104.2.33
	RELENG_2_2_5_RELEASE:1.104.2.24
	RELENG_2_2_2_RELEASE:1.104.2.14
	RELENG_2_2_1_RELEASE:1.104.2.5
	RELENG_2_2_0_RELEASE:1.104.2.5
	RELENG_2_1_7_RELEASE:1.66.4.15
	RELENG_2_1_6_1_RELEASE:1.66.4.15
	RELENG_2_1_6_RELEASE:1.66.4.15
	RELENG_2_2:1.104.0.2
	RELENG_2_2_BP:1.104
	RELENG_2_1_5_RELEASE:1.66.4.15
	RELENG_2_1_0_RELEASE:1.66.4.7
	RELENG_2_1_0:1.66.0.4
	RELENG_2_1_0_BP:1.66
	RELENG_2_0_5_RELEASE:1.66
	RELENG_2_0_5:1.66.0.2
	RELENG_2_0_5_BP:1.66
	RELENG_2_0_5_ALPHA:1.66
	RELEASE_2_0:1.40
	BETA_2_0:1.40
	ALPHA_2_0:1.39.0.2
	MOVED_NEWCVS:1.27
	FINAL_1_1_5:1.27
	ALPHA_1_1_5:1.27
	FINAL_1_1:1.19.2.2
	GAMMA_1_1:1.19.2.2
	BETA_1_1:1.19.0.2
	BP_BETA_1_1:1.19
	FINAL_1_0:1.3
	EPSILON_1_0:1.3
	GAMMA_1_0:1.3
	BETA_1_0:1.2
	ALPHA_1_0:1.2
	V_0_0_1_0:1.1.1.1;
locks; strict;
comment	@# @;


1.346
date	2013.05.20.00.28.17;	author svnexp;	state Exp;
branches;
next	1.345;

1.345
date	2012.11.17.01.49.02;	author svnexp;	state Exp;
branches
	1.345.2.1;
next	1.344;

1.344
date	2012.03.14.16.10.39;	author ed;	state Exp;
branches;
next	1.343;

1.343
date	2011.04.29.21.10.41;	author dougb;	state Exp;
branches
	1.343.2.1;
next	1.342;

1.342
date	2008.06.23.04.18.22;	author mtm;	state Exp;
branches
	1.342.2.1;
next	1.341;

1.341
date	2008.01.26.11.22.11;	author mtm;	state Exp;
branches;
next	1.340;

1.340
date	2007.04.02.22.53.06;	author des;	state Exp;
branches
	1.340.2.1
	1.340.6.1
	1.340.8.1
	1.340.10.1;
next	1.339;

1.339
date	2006.02.20.21.54.30;	author dougb;	state Exp;
branches;
next	1.338;

1.338
date	2005.12.10.20.21.45;	author dougb;	state Exp;
branches;
next	1.337;

1.337
date	2005.12.02.20.06.07;	author dougb;	state Exp;
branches;
next	1.336;

1.336
date	2005.04.29.23.02.56;	author brooks;	state Exp;
branches
	1.336.2.1;
next	1.335;

1.335
date	2004.10.08.14.23.49;	author mtm;	state Exp;
branches;
next	1.334;

1.334
date	2004.10.07.13.55.25;	author mtm;	state Exp;
branches;
next	1.333;

1.333
date	2004.07.24.16.30.31;	author mtm;	state Exp;
branches
	1.333.2.1;
next	1.332;

1.332
date	2004.06.06.18.06.09;	author mtm;	state Exp;
branches;
next	1.331;

1.331
date	2004.03.08.12.02.07;	author pjd;	state Exp;
branches;
next	1.330;

1.330
date	2004.02.27.10.44.33;	author mtm;	state Exp;
branches;
next	1.329;

1.329
date	2003.05.02.05.27.33;	author dougb;	state Exp;
branches;
next	1.328;

1.328
date	2003.04.27.07.08.07;	author dougb;	state Exp;
branches;
next	1.327;

1.327
date	2003.04.23.15.38.02;	author matusita;	state Exp;
branches;
next	1.326;

1.326
date	2002.12.23.07.09.44;	author dillon;	state Exp;
branches;
next	1.325;

1.325
date	2002.12.22.22.18.41;	author dillon;	state Exp;
branches;
next	1.324;

1.324
date	2002.12.18.07.21.30;	author mckusick;	state Exp;
branches;
next	1.323;

1.323
date	2002.11.26.17.51.03;	author rwatson;	state Exp;
branches;
next	1.322;

1.322
date	2002.10.12.07.21.18;	author dd;	state Exp;
branches;
next	1.321;

1.321
date	2002.10.03.20.39.29;	author schweikh;	state Exp;
branches;
next	1.320;

1.320
date	2002.10.02.00.59.14;	author dd;	state Exp;
branches;
next	1.319;

1.319
date	2002.09.17.01.48.48;	author peter;	state Exp;
branches;
next	1.318;

1.318
date	2002.09.11.01.00.56;	author gordon;	state Exp;
branches;
next	1.317;

1.317
date	2002.08.15.03.24.47;	author gordon;	state Exp;
branches;
next	1.316;

1.316
date	2002.08.14.05.58.44;	author gordon;	state Exp;
branches;
next	1.315;

1.315
date	2002.08.14.05.37.06;	author gordon;	state Exp;
branches;
next	1.314;

1.314
date	2002.06.13.22.30.02;	author gordon;	state Exp;
branches;
next	1.313;

1.313
date	2002.05.16.02.10.03;	author trhodes;	state Exp;
branches;
next	1.312;

1.312
date	2002.05.08.14.47.44;	author nectar;	state Exp;
branches;
next	1.311;

1.311
date	2002.04.26.22.32.14;	author wes;	state Exp;
branches;
next	1.310;

1.310
date	2002.04.26.07.31.03;	author wes;	state Exp;
branches;
next	1.309;

1.309
date	2002.04.23.00.05.48;	author obrien;	state Exp;
branches;
next	1.308;

1.308
date	2002.04.05.02.30.40;	author gshapiro;	state Exp;
branches;
next	1.307;

1.307
date	2002.03.28.03.29.18;	author gshapiro;	state Exp;
branches;
next	1.306;

1.306
date	2002.03.26.02.38.08;	author obrien;	state Exp;
branches;
next	1.305;

1.305
date	2002.03.25.20.53.48;	author obrien;	state Exp;
branches;
next	1.304;

1.304
date	2002.03.22.23.45.13;	author obrien;	state Exp;
branches;
next	1.303;

1.303
date	2002.03.18.00.56.51;	author dougb;	state Exp;
branches;
next	1.302;

1.302
date	2002.03.17.20.14.11;	author dougb;	state Exp;
branches;
next	1.301;

1.301
date	2002.03.17.08.38.03;	author dougb;	state Exp;
branches;
next	1.300;

1.300
date	2002.03.16.20.01.25;	author cjc;	state Exp;
branches;
next	1.299;

1.299
date	2002.03.12.21.47.30;	author rwatson;	state Exp;
branches;
next	1.298;

1.298
date	2002.03.12.20.59.35;	author cjc;	state Exp;
branches;
next	1.297;

1.297
date	2002.03.11.08.46.55;	author cjc;	state Exp;
branches;
next	1.296;

1.296
date	2002.02.17.22.19.14;	author gshapiro;	state Exp;
branches;
next	1.295;

1.295
date	2002.02.17.02.01.15;	author cjc;	state Exp;
branches;
next	1.294;

1.294
date	2002.02.04.12.50.52;	author nyan;	state Exp;
branches;
next	1.293;

1.293
date	2002.01.28.11.06.02;	author sheldonh;	state Exp;
branches;
next	1.292;

1.292
date	2002.01.28.11.05.01;	author sheldonh;	state Exp;
branches;
next	1.291;

1.291
date	2001.12.29.19.42.54;	author sheldonh;	state Exp;
branches;
next	1.290;

1.290
date	2001.12.27.13.41.26;	author sheldonh;	state Exp;
branches;
next	1.289;

1.289
date	2001.12.19.16.10.25;	author brian;	state Exp;
branches;
next	1.288;

1.288
date	2001.12.12.10.12.20;	author roam;	state Exp;
branches;
next	1.287;

1.287
date	2001.12.11.08.21.45;	author ru;	state Exp;
branches;
next	1.286;

1.286
date	2001.10.19.06.50.52;	author dougb;	state Exp;
branches;
next	1.285;

1.285
date	2001.10.10.04.25.44;	author dougb;	state Exp;
branches;
next	1.284;

1.284
date	2001.10.09.18.39.59;	author des;	state Exp;
branches;
next	1.283;

1.283
date	2001.10.02.12.00.39;	author ru;	state Exp;
branches;
next	1.282;

1.282
date	2001.10.02.11.50.14;	author knu;	state Exp;
branches;
next	1.281;

1.281
date	2001.10.01.22.52.32;	author obrien;	state Exp;
branches;
next	1.280;

1.280
date	2001.10.01.21.30.27;	author obrien;	state Exp;
branches;
next	1.279;

1.279
date	2001.09.30.22.07.19;	author obrien;	state Exp;
branches;
next	1.278;

1.278
date	2001.09.26.06.17.25;	author phk;	state Exp;
branches;
next	1.277;

1.277
date	2001.09.26.06.01.40;	author obrien;	state Exp;
branches;
next	1.276;

1.276
date	2001.09.25.01.55.21;	author obrien;	state Exp;
branches;
next	1.275;

1.275
date	2001.09.24.18.17.11;	author obrien;	state Exp;
branches;
next	1.274;

1.274
date	2001.09.24.03.03.51;	author obrien;	state Exp;
branches;
next	1.273;

1.273
date	2001.08.29.05.39.06;	author obrien;	state Exp;
branches;
next	1.272;

1.272
date	2001.07.17.14.33.50;	author roam;	state Exp;
branches;
next	1.271;

1.271
date	2001.06.28.06.43.47;	author rwatson;	state Exp;
branches;
next	1.270;

1.270
date	2001.06.28.03.32.09;	author dd;	state Exp;
branches;
next	1.269;

1.269
date	2001.06.10.12.09.11;	author sheldonh;	state Exp;
branches;
next	1.268;

1.268
date	2001.06.09.09.47.05;	author sheldonh;	state Exp;
branches;
next	1.267;

1.267
date	2001.06.03.20.15.10;	author phk;	state Exp;
branches;
next	1.266;

1.266
date	2001.05.27.22.50.22;	author yar;	state Exp;
branches;
next	1.265;

1.265
date	2001.05.22.00.05.45;	author dd;	state Exp;
branches;
next	1.264;

1.264
date	2001.05.13.20.43.30;	author peter;	state Exp;
branches;
next	1.263;

1.263
date	2001.05.11.07.40.39;	author mckusick;	state Exp;
branches;
next	1.262;

1.262
date	2001.05.10.09.25.10;	author brian;	state Exp;
branches;
next	1.261;

1.261
date	2001.04.15.13.44.05;	author phk;	state Exp;
branches;
next	1.260;

1.260
date	2001.04.14.12.26.03;	author jkh;	state Exp;
branches;
next	1.259;

1.259
date	2001.04.10.16.15.01;	author ru;	state Exp;
branches;
next	1.258;

1.258
date	2001.03.28.10.13.26;	author brian;	state Exp;
branches;
next	1.257;

1.257
date	2001.03.13.05.53.16;	author peter;	state Exp;
branches;
next	1.256;

1.256
date	2001.03.12.05.18.00;	author dougb;	state Exp;
branches;
next	1.255;

1.255
date	2001.03.10.13.45.28;	author markm;	state Exp;
branches;
next	1.254;

1.254
date	2001.03.10.05.33.37;	author dougb;	state Exp;
branches;
next	1.253;

1.253
date	2001.03.01.13.19.48;	author dougb;	state Exp;
branches;
next	1.252;

1.252
date	2001.02.05.04.54.41;	author dougb;	state Exp;
branches;
next	1.251;

1.251
date	2001.01.30.10.07.03;	author brian;	state Exp;
branches;
next	1.250;

1.250
date	2001.01.21.20.57.13;	author dougb;	state Exp;
branches;
next	1.249;

1.249
date	2001.01.16.20.05.02;	author des;	state Exp;
branches;
next	1.248;

1.248
date	2001.01.14.07.18.20;	author dougb;	state Exp;
branches;
next	1.247;

1.247
date	2001.01.11.13.00.41;	author dougb;	state Exp;
branches;
next	1.246;

1.246
date	2001.01.11.02.11.14;	author bsd;	state Exp;
branches;
next	1.245;

1.245
date	2001.01.09.22.28.17;	author jhb;	state Exp;
branches;
next	1.244;

1.244
date	2000.12.17.08.24.49;	author dougb;	state Exp;
branches;
next	1.243;

1.243
date	2000.12.13.19.17.54;	author bsd;	state Exp;
branches;
next	1.242;

1.242
date	2000.12.13.00.43.10;	author bsd;	state Exp;
branches;
next	1.241;

1.241
date	2000.12.11.22.47.50;	author obrien;	state Exp;
branches;
next	1.240;

1.240
date	2000.11.21.04.21.54;	author dougb;	state Exp;
branches;
next	1.239;

1.239
date	2000.10.22.19.10.13;	author phk;	state Exp;
branches;
next	1.238;

1.238
date	2000.10.20.17.41.46;	author jkh;	state Exp;
branches;
next	1.237;

1.237
date	2000.10.18.05.29.26;	author jwd;	state Exp;
branches;
next	1.236;

1.236
date	2000.10.16.06.16.44;	author jwd;	state Exp;
branches;
next	1.235;

1.235
date	2000.10.16.04.44.35;	author jwd;	state Exp;
branches;
next	1.234;

1.234
date	2000.10.14.12.56.08;	author markm;	state Exp;
branches;
next	1.233;

1.233
date	2000.10.12.21.40.04;	author ache;	state Exp;
branches;
next	1.232;

1.232
date	2000.10.12.10.34.59;	author ru;	state Exp;
branches;
next	1.231;

1.231
date	2000.10.08.19.18.24;	author obrien;	state Exp;
branches;
next	1.230;

1.230
date	2000.08.21.14.37.52;	author sheldonh;	state Exp;
branches;
next	1.229;

1.229
date	2000.08.21.14.33.20;	author sheldonh;	state Exp;
branches;
next	1.228;

1.228
date	2000.08.18.08.53.26;	author sheldonh;	state Exp;
branches;
next	1.227;

1.227
date	2000.08.18.08.11.23;	author sheldonh;	state Exp;
branches;
next	1.226;

1.226
date	2000.08.18.08.07.02;	author sheldonh;	state Exp;
branches;
next	1.225;

1.225
date	2000.08.15.18.02.49;	author obrien;	state Exp;
branches;
next	1.224;

1.224
date	2000.08.11.03.26.22;	author jdp;	state Exp;
branches;
next	1.223;

1.223
date	2000.08.09.09.23.30;	author brian;	state Exp;
branches;
next	1.222;

1.222
date	2000.08.08.13.30.27;	author brian;	state Exp;
branches;
next	1.221;

1.221
date	2000.07.24.13.40.41;	author sheldonh;	state Exp;
branches;
next	1.220;

1.220
date	2000.07.17.13.39.48;	author sheldonh;	state Exp;
branches;
next	1.219;

1.219
date	2000.07.17.12.28.58;	author markm;	state Exp;
branches;
next	1.218;

1.218
date	2000.06.08.08.57.35;	author brian;	state Exp;
branches;
next	1.217;

1.217
date	2000.05.29.12.31.26;	author asmodai;	state Exp;
branches;
next	1.216;

1.216
date	2000.05.11.06.31.59;	author davidn;	state Exp;
branches;
next	1.215;

1.215
date	2000.04.27.08.43.47;	author sheldonh;	state Exp;
branches;
next	1.214;

1.214
date	2000.03.27.16.36.25;	author dan;	state Exp;
branches;
next	1.213;

1.213
date	2000.03.25.16.17.53;	author dan;	state Exp;
branches;
next	1.212;

1.212
date	2000.02.28.19.54.06;	author markm;	state Exp;
branches
	1.212.2.1;
next	1.211;

1.211
date	2000.02.23.18.05.57;	author shin;	state Exp;
branches;
next	1.210;

1.210
date	2000.02.03.06.06.36;	author nsayer;	state Exp;
branches;
next	1.209;

1.209
date	2000.01.15.14.28.05;	author green;	state Exp;
branches;
next	1.208;

1.208
date	2000.01.06.14.27.37;	author peter;	state Exp;
branches;
next	1.207;

1.207
date	2000.01.05.09.19.27;	author peter;	state Exp;
branches;
next	1.206;

1.206
date	2000.01.05.08.17.18;	author peter;	state Exp;
branches;
next	1.205;

1.205
date	99.12.27.07.43.07;	author peter;	state Exp;
branches;
next	1.204;

1.204
date	99.12.19.22.05.32;	author obrien;	state Exp;
branches;
next	1.203;

1.203
date	99.11.30.03.34.01;	author ache;	state Exp;
branches;
next	1.202;

1.202
date	99.11.22.04.23.08;	author dillon;	state Exp;
branches;
next	1.201;

1.201
date	99.11.17.22.38.01;	author ache;	state Exp;
branches;
next	1.200;

1.200
date	99.09.24.06.49.00;	author nsayer;	state Exp;
branches;
next	1.199;

1.199
date	99.09.22.06.31.31;	author jkoshy;	state Exp;
branches;
next	1.198;

1.198
date	99.09.13.15.44.18;	author sheldonh;	state Exp;
branches;
next	1.197;

1.197
date	99.09.12.18.13.11;	author roberto;	state Exp;
branches;
next	1.196;

1.196
date	99.08.30.03.34.46;	author imp;	state Exp;
branches;
next	1.195;

1.195
date	99.08.27.23.23.43;	author peter;	state Exp;
branches;
next	1.194;

1.194
date	99.08.25.16.01.33;	author sheldonh;	state Exp;
branches;
next	1.193;

1.193
date	99.08.06.06.22.43;	author peter;	state Exp;
branches;
next	1.192;

1.192
date	99.08.06.06.20.19;	author peter;	state Exp;
branches;
next	1.191;

1.191
date	99.08.06.06.16.06;	author peter;	state Exp;
branches;
next	1.190;

1.190
date	99.08.02.05.42.44;	author imp;	state Exp;
branches;
next	1.189;

1.189
date	99.06.21.15.59.42;	author sheldonh;	state Exp;
branches;
next	1.188;

1.188
date	99.06.01.10.47.53;	author brian;	state Exp;
branches;
next	1.187;

1.187
date	99.04.02.09.35.34;	author cracauer;	state Exp;
branches;
next	1.186;

1.186
date	99.04.02.07.15.43;	author grog;	state Exp;
branches;
next	1.185;

1.185
date	99.04.01.13.30.29;	author cracauer;	state Exp;
branches;
next	1.184;

1.184
date	99.03.28.20.36.03;	author imp;	state Exp;
branches;
next	1.183;

1.183
date	99.03.17.04.00.04;	author billf;	state Exp;
branches;
next	1.182;

1.182
date	99.03.14.20.26.39;	author des;	state Exp;
branches;
next	1.181;

1.181
date	99.03.14.03.20.22;	author des;	state Exp;
branches;
next	1.180;

1.180
date	99.03.11.16.17.24;	author jfitz;	state Exp;
branches;
next	1.179;

1.179
date	99.02.13.05.30.49;	author jkh;	state Exp;
branches;
next	1.178;

1.178
date	99.02.10.18.08.16;	author jkh;	state Exp;
branches;
next	1.177;

1.177
date	99.02.09.17.17.18;	author dillon;	state Exp;
branches;
next	1.176;

1.176
date	99.02.09.05.20.46;	author dillon;	state Exp;
branches;
next	1.175;

1.175
date	99.01.31.04.28.51;	author grog;	state Exp;
branches;
next	1.174;

1.174
date	99.01.29.06.18.12;	author dillon;	state Exp;
branches;
next	1.173;

1.173
date	99.01.26.05.14.36;	author peter;	state Exp;
branches;
next	1.172;

1.172
date	99.01.26.04.59.43;	author peter;	state Exp;
branches;
next	1.171;

1.171
date	99.01.25.18.07.25;	author dillon;	state Exp;
branches;
next	1.170;

1.170
date	99.01.25.04.40.53;	author dillon;	state Exp;
branches;
next	1.169;

1.169
date	99.01.20.12.30.13;	author jkh;	state Exp;
branches
	1.169.2.1;
next	1.168;

1.168
date	99.01.18.03.25.10;	author grog;	state Exp;
branches;
next	1.167;

1.167
date	99.01.17.03.32.07;	author grog;	state Exp;
branches;
next	1.166;

1.166
date	99.01.11.09.07.38;	author asami;	state Exp;
branches;
next	1.165;

1.165
date	99.01.10.22.06.22;	author n_hibma;	state Exp;
branches;
next	1.164;

1.164
date	99.01.06.14.01.52;	author peter;	state Exp;
branches;
next	1.163;

1.163
date	98.12.12.23.04.20;	author dillon;	state Exp;
branches;
next	1.162;

1.162
date	98.12.11.08.25.12;	author jb;	state Exp;
branches;
next	1.161;

1.161
date	98.12.10.08.06.59;	author jb;	state Exp;
branches;
next	1.160;

1.160
date	98.10.09.17.11.14;	author des;	state Exp;
branches;
next	1.159;

1.159
date	98.10.08.18.47.29;	author des;	state Exp;
branches;
next	1.158;

1.158
date	98.09.30.14.44.57;	author cracauer;	state Exp;
branches;
next	1.157;

1.157
date	98.09.16.22.42.56;	author brian;	state Exp;
branches;
next	1.156;

1.156
date	98.09.16.05.42.37;	author jdp;	state Exp;
branches;
next	1.155;

1.155
date	98.09.14.09.14.46;	author sos;	state Exp;
branches;
next	1.154;

1.154
date	98.09.09.22.27.21;	author jraynard;	state Exp;
branches;
next	1.153;

1.153
date	98.09.07.17.18.36;	author cracauer;	state Exp;
branches;
next	1.152;

1.152
date	98.09.05.04.27.35;	author jdp;	state Exp;
branches;
next	1.151;

1.151
date	98.08.24.07.11.48;	author gpalmer;	state Exp;
branches;
next	1.150;

1.150
date	98.08.20.11.22.52;	author phk;	state Exp;
branches;
next	1.149;

1.149
date	98.08.14.06.49.05;	author phk;	state Exp;
branches;
next	1.148;

1.148
date	98.08.10.19.53.50;	author brian;	state Exp;
branches;
next	1.147;

1.147
date	98.07.28.01.15.12;	author nectar;	state Exp;
branches;
next	1.146;

1.146
date	98.06.22.06.34.12;	author jkoshy;	state Exp;
branches;
next	1.145;

1.145
date	98.06.02.11.02.16;	author phk;	state Exp;
branches;
next	1.144;

1.144
date	98.05.26.20.12.45;	author sos;	state Exp;
branches;
next	1.143;

1.143
date	98.01.08.17.08.22;	author joerg;	state Exp;
branches;
next	1.142;

1.142
date	97.12.27.19.46.53;	author steve;	state Exp;
branches;
next	1.141;

1.141
date	97.12.09.10.06.49;	author danny;	state Exp;
branches;
next	1.140;

1.140
date	97.12.09.07.22.04;	author danny;	state Exp;
branches;
next	1.139;

1.139
date	97.11.16.12.52.16;	author steve;	state Exp;
branches;
next	1.138;

1.138
date	97.09.21.16.09.47;	author joerg;	state Exp;
branches;
next	1.137;

1.137
date	97.09.13.21.07.12;	author brian;	state Exp;
branches;
next	1.136;

1.136
date	97.09.13.09.29.21;	author brian;	state Exp;
branches;
next	1.135;

1.135
date	97.08.17.15.02.34;	author joerg;	state Exp;
branches;
next	1.134;

1.134
date	97.08.17.14.58.57;	author joerg;	state Exp;
branches;
next	1.133;

1.133
date	97.07.13.13.22.15;	author jkh;	state Exp;
branches;
next	1.132;

1.132
date	97.07.11.14.52.52;	author jkh;	state Exp;
branches;
next	1.131;

1.131
date	97.06.25.11.48.47;	author pst;	state Exp;
branches;
next	1.130;

1.130
date	97.06.25.03.12.12;	author dima;	state Exp;
branches;
next	1.129;

1.129
date	97.06.18.16.01.18;	author pst;	state Exp;
branches;
next	1.128;

1.128
date	97.06.04.20.02.57;	author ache;	state Exp;
branches;
next	1.127;

1.127
date	97.06.04.19.20.04;	author ache;	state Exp;
branches;
next	1.126;

1.126
date	97.06.02.10.21.12;	author ache;	state Exp;
branches;
next	1.125;

1.125
date	97.06.01.23.33.00;	author ache;	state Exp;
branches;
next	1.124;

1.124
date	97.05.19.07.46.48;	author jkh;	state Exp;
branches;
next	1.123;

1.123
date	97.05.07.12.35.03;	author jkh;	state Exp;
branches;
next	1.122;

1.122
date	97.05.05.07.08.30;	author jkh;	state Exp;
branches;
next	1.121;

1.121
date	97.05.04.22.33.17;	author andreas;	state Exp;
branches;
next	1.120;

1.120
date	97.05.04.12.50.33;	author andreas;	state Exp;
branches;
next	1.119;

1.119
date	97.05.03.11.22.16;	author jkh;	state Exp;
branches;
next	1.118;

1.118
date	97.05.01.05.57.29;	author jkh;	state Exp;
branches;
next	1.117;

1.117
date	97.04.27.03.59.13;	author jkh;	state Exp;
branches;
next	1.116;

1.116
date	97.04.09.20.14.59;	author guido;	state Exp;
branches;
next	1.115;

1.115
date	97.04.01.01.00.34;	author pst;	state Exp;
branches;
next	1.114;

1.114
date	97.03.16.15.26.32;	author joerg;	state Exp;
branches;
next	1.113;

1.113
date	97.02.23.09.20.46;	author peter;	state Exp;
branches;
next	1.112;

1.112
date	97.01.16.02.18.37;	author jkh;	state Exp;
branches;
next	1.111;

1.111
date	97.01.14.05.44.31;	author jkh;	state Exp;
branches;
next	1.110;

1.110
date	97.01.02.18.55.26;	author phk;	state Exp;
branches;
next	1.109;

1.109
date	97.01.02.16.28.33;	author phk;	state Exp;
branches;
next	1.108;

1.108
date	96.12.23.00.32.15;	author joerg;	state Exp;
branches;
next	1.107;

1.107
date	96.12.19.18.06.35;	author joerg;	state Exp;
branches;
next	1.106;

1.106
date	96.11.13.19.04.31;	author adam;	state Exp;
branches;
next	1.105;

1.105
date	96.11.03.14.41.58;	author joerg;	state Exp;
branches;
next	1.104;

1.104
date	96.11.01.09.45.51;	author peter;	state Exp;
branches
	1.104.2.1;
next	1.103;

1.103
date	96.10.28.08.28.02;	author joerg;	state Exp;
branches;
next	1.102;

1.102
date	96.10.21.20.09.30;	author wpaul;	state Exp;
branches;
next	1.101;

1.101
date	96.10.08.20.02.57;	author peter;	state Exp;
branches;
next	1.100;

1.100
date	96.10.08.20.00.44;	author peter;	state Exp;
branches;
next	1.99;

1.99
date	96.09.22.06.36.49;	author imp;	state Exp;
branches;
next	1.98;

1.98
date	96.09.02.13.09.54;	author phk;	state Exp;
branches;
next	1.97;

1.97
date	96.08.21.23.15.36;	author jkh;	state Exp;
branches;
next	1.96;

1.96
date	96.07.30.06.28.59;	author jkh;	state Exp;
branches;
next	1.95;

1.95
date	96.07.18.19.09.06;	author pst;	state Exp;
branches;
next	1.94;

1.94
date	96.07.13.17.27.39;	author pst;	state Exp;
branches;
next	1.93;

1.93
date	96.06.24.19.00.28;	author pst;	state Exp;
branches;
next	1.92;

1.92
date	96.06.22.13.05.20;	author joerg;	state Exp;
branches;
next	1.91;

1.91
date	96.06.15.17.04.48;	author jkh;	state Exp;
branches;
next	1.90;

1.90
date	96.05.19.22.30.26;	author ache;	state Exp;
branches;
next	1.89;

1.89
date	96.05.08.09.25.57;	author jkh;	state Exp;
branches;
next	1.88;

1.88
date	96.05.03.05.37.04;	author asami;	state Exp;
branches;
next	1.87;

1.87
date	96.03.14.18.24.05;	author nate;	state Exp;
branches;
next	1.86;

1.86
date	96.03.12.15.39.24;	author nate;	state Exp;
branches;
next	1.85;

1.85
date	96.02.23.10.44.49;	author adam;	state Exp;
branches;
next	1.84;

1.84
date	96.02.09.12.20.37;	author jkh;	state Exp;
branches;
next	1.83;

1.83
date	96.01.29.08.46.13;	author gpalmer;	state Exp;
branches;
next	1.82;

1.82
date	96.01.28.08.08.36;	author gpalmer;	state Exp;
branches;
next	1.81;

1.81
date	96.01.16.08.04.06;	author graichen;	state Exp;
branches;
next	1.80;

1.80
date	95.12.28.01.24.04;	author jkh;	state Exp;
branches;
next	1.79;

1.79
date	95.12.09.19.40.12;	author ache;	state Exp;
branches;
next	1.78;

1.78
date	95.11.04.05.03.16;	author pst;	state Exp;
branches;
next	1.77;

1.77
date	95.11.01.16.53.25;	author nate;	state Exp;
branches;
next	1.76;

1.76
date	95.11.01.00.22.45;	author ache;	state Exp;
branches;
next	1.75;

1.75
date	95.10.29.12.43.47;	author ache;	state Exp;
branches;
next	1.74;

1.74
date	95.10.28.23.32.26;	author pst;	state Exp;
branches;
next	1.73;

1.73
date	95.09.19.10.19.39;	author jkh;	state Exp;
branches;
next	1.72;

1.72
date	95.09.19.08.33.42;	author jkh;	state Exp;
branches;
next	1.71;

1.71
date	95.09.18.19.17.13;	author paul;	state Exp;
branches;
next	1.70;

1.70
date	95.09.18.07.38.18;	author jkh;	state Exp;
branches;
next	1.69;

1.69
date	95.09.14.02.44.47;	author jkh;	state Exp;
branches;
next	1.68;

1.68
date	95.07.20.16.26.25;	author wollman;	state Exp;
branches;
next	1.67;

1.67
date	95.06.25.04.01.32;	author bde;	state Exp;
branches;
next	1.66;

1.66
date	95.05.15.19.50.59;	author rgrimes;	state Exp;
branches
	1.66.4.1;
next	1.65;

1.65
date	95.05.15.08.39.08;	author davidg;	state Exp;
branches;
next	1.64;

1.64
date	95.05.11.21.11.17;	author jkh;	state Exp;
branches;
next	1.63;

1.63
date	95.04.11.18.36.10;	author ache;	state Exp;
branches;
next	1.62;

1.62
date	95.04.11.01.22.21;	author rgrimes;	state Exp;
branches;
next	1.61;

1.61
date	95.04.09.09.54.42;	author rgrimes;	state Exp;
branches;
next	1.60;

1.60
date	95.03.30.06.26.09;	author rgrimes;	state Exp;
branches;
next	1.59;

1.59
date	95.03.30.00.01.08;	author ache;	state Exp;
branches;
next	1.58;

1.58
date	95.03.29.03.42.16;	author jkh;	state Exp;
branches;
next	1.57;

1.57
date	95.03.29.03.35.10;	author jkh;	state Exp;
branches;
next	1.56;

1.56
date	95.03.26.18.18.58;	author wpaul;	state Exp;
branches;
next	1.55;

1.55
date	95.03.24.00.16.24;	author jkh;	state Exp;
branches;
next	1.54;

1.54
date	95.03.24.00.11.02;	author jkh;	state Exp;
branches;
next	1.53;

1.53
date	95.03.24.00.01.20;	author jkh;	state Exp;
branches;
next	1.52;

1.52
date	95.03.23.06.42.36;	author jkh;	state Exp;
branches;
next	1.51;

1.51
date	95.03.23.01.25.16;	author jkh;	state Exp;
branches;
next	1.50;

1.50
date	95.03.22.03.29.52;	author ache;	state Exp;
branches;
next	1.49;

1.49
date	95.03.21.16.44.03;	author wollman;	state Exp;
branches;
next	1.48;

1.48
date	95.03.21.15.20.47;	author jkh;	state Exp;
branches;
next	1.47;

1.47
date	95.03.17.17.57.24;	author rgrimes;	state Exp;
branches;
next	1.46;

1.46
date	95.03.16.16.58.00;	author wollman;	state Exp;
branches;
next	1.45;

1.45
date	95.01.26.19.04.29;	author jkh;	state Exp;
branches;
next	1.44;

1.44
date	95.01.24.16.49.14;	author jkh;	state Exp;
branches;
next	1.43;

1.43
date	94.12.18.01.21.51;	author ache;	state Exp;
branches;
next	1.42;

1.42
date	94.12.05.19.46.35;	author ache;	state Exp;
branches;
next	1.41;

1.41
date	94.11.26.19.25.14;	author ache;	state Exp;
branches;
next	1.40;

1.40
date	94.11.17.08.28.02;	author smace;	state Exp;
branches;
next	1.39;

1.39
date	94.11.07.04.02.26;	author phk;	state Exp;
branches;
next	1.38;

1.38
date	94.11.02.09.41.35;	author ache;	state Exp;
branches;
next	1.37;

1.37
date	94.11.01.16.24.03;	author ache;	state Exp;
branches;
next	1.36;

1.36
date	94.10.30.04.33.57;	author ache;	state Exp;
branches;
next	1.35;

1.35
date	94.10.25.08.23.02;	author davidg;	state Exp;
branches;
next	1.34;

1.34
date	94.09.29.17.27.46;	author pst;	state Exp;
branches;
next	1.33;

1.33
date	94.09.26.16.52.04;	author pst;	state Exp;
branches;
next	1.32;

1.32
date	94.09.24.03.42.08;	author wollman;	state Exp;
branches;
next	1.31;

1.31
date	94.09.23.18.02.22;	author davidg;	state Exp;
branches;
next	1.30;

1.30
date	94.09.23.07.16.16;	author rgrimes;	state Exp;
branches;
next	1.29;

1.29
date	94.09.15.02.21.39;	author phk;	state Exp;
branches;
next	1.28;

1.28
date	94.08.21.04.28.44;	author davidg;	state Exp;
branches;
next	1.27;

1.27
date	94.06.06.17.45.37;	author phk;	state Exp;
branches;
next	1.26;

1.26
date	94.06.05.16.03.57;	author ats;	state Exp;
branches;
next	1.25;

1.25
date	94.06.04.00.43.59;	author ache;	state Exp;
branches;
next	1.24;

1.24
date	94.06.01.17.04.01;	author paul;	state Exp;
branches;
next	1.23;

1.23
date	94.05.23.11.22.10;	author ache;	state Exp;
branches;
next	1.22;

1.22
date	94.04.25.15.33.12;	author jkh;	state Exp;
branches;
next	1.21;

1.21
date	94.03.25.04.58.58;	author rich;	state Exp;
branches;
next	1.20;

1.20
date	94.02.27.15.32.09;	author phk;	state Exp;
branches;
next	1.19;

1.19
date	94.02.21.11.28.45;	author rgrimes;	state Exp;
branches
	1.19.2.1;
next	1.18;

1.18
date	94.02.21.03.16.43;	author rgrimes;	state Exp;
branches;
next	1.17;

1.17
date	94.02.21.02.47.47;	author rgrimes;	state Exp;
branches;
next	1.16;

1.16
date	94.02.02.08.02.37;	author chmr;	state Exp;
branches;
next	1.15;

1.15
date	94.01.22.20.44.13;	author guido;	state Exp;
branches;
next	1.14;

1.14
date	94.01.08.17.49.47;	author ache;	state Exp;
branches;
next	1.13;

1.13
date	94.01.04.18.06.18;	author ache;	state Exp;
branches;
next	1.12;

1.12
date	93.12.30.18.19.17;	author jkh;	state Exp;
branches;
next	1.11;

1.11
date	93.12.21.21.28.12;	author wollman;	state Exp;
branches;
next	1.10;

1.10
date	93.12.21.02.58.15;	author ache;	state Exp;
branches;
next	1.9;

1.9
date	93.12.17.04.20.30;	author ache;	state Exp;
branches;
next	1.8;

1.8
date	93.12.13.08.28.03;	author davidg;	state Exp;
branches;
next	1.7;

1.7
date	93.11.30.16.59.27;	author rich;	state Exp;
branches;
next	1.6;

1.6
date	93.11.25.13.23.46;	author davidg;	state Exp;
branches;
next	1.5;

1.5
date	93.11.24.05.17.14;	author rich;	state Exp;
branches;
next	1.4;

1.4
date	93.11.07.01.19.06;	author wollman;	state Exp;
branches;
next	1.3;

1.3
date	93.08.24.06.15.36;	author swallace;	state Exp;
branches;
next	1.2;

1.2
date	93.07.19.18.55.38;	author rgrimes;	state Exp;
branches;
next	1.1;

1.1
date	93.06.20.13.41.39;	author rgrimes;	state Exp;
branches
	1.1.1.1;
next	;

1.345.2.1
date	2012.11.17.01.49.02;	author svnexp;	state dead;
branches;
next	1.345.2.2;

1.345.2.2
date	2013.03.28.13.02.41;	author svnexp;	state Exp;
branches;
next	;

1.343.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.343.2.1.2.1;
next	1.343.2.2;

1.343.2.2
date	2012.04.06.11.07.44;	author ed;	state Exp;
branches
	1.343.2.2.2.1;
next	1.343.2.3;

1.343.2.3
date	2012.11.17.11.36.10;	author svnexp;	state Exp;
branches;
next	1.343.2.4;

1.343.2.4
date	2013.05.22.19.01.43;	author svnexp;	state Exp;
branches;
next	1.343.2.5;

1.343.2.5
date	2013.10.22.17.01.44;	author svnexp;	state Exp;
branches;
next	1.343.2.6;

1.343.2.6
date	2014.01.08.03.01.50;	author svnexp;	state Exp;
branches;
next	;

1.343.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.343.2.1.2.2;

1.343.2.1.2.2
date	2012.11.17.08.36.10;	author svnexp;	state Exp;
branches;
next	;

1.343.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.343.2.2.2.2;

1.343.2.2.2.2
date	2012.11.17.08.47.00;	author svnexp;	state Exp;
branches;
next	;

1.342.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.342.2.1.2.1
	1.342.2.1.4.1
	1.342.2.1.6.1;
next	1.342.2.2;

1.342.2.2
date	2011.05.14.21.31.18;	author dougb;	state Exp;
branches
	1.342.2.2.2.1;
next	1.342.2.3;

1.342.2.3
date	2012.11.17.10.35.56;	author svnexp;	state Exp;
branches;
next	;

1.342.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.342.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.342.2.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.342.2.2.2.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.342.2.2.2.2;

1.342.2.2.2.2
date	2012.11.17.08.24.37;	author svnexp;	state Exp;
branches;
next	;

1.340.2.1
date	2010.07.08.13.34.01;	author jhb;	state Exp;
branches
	1.340.2.1.2.1;
next	1.340.2.2;

1.340.2.2
date	2011.05.14.21.34.21;	author dougb;	state Exp;
branches;
next	1.340.2.3;

1.340.2.3
date	2012.11.17.08.01.15;	author svnexp;	state Exp;
branches;
next	;

1.340.2.1.2.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.340.2.1.2.2;

1.340.2.1.2.2
date	2012.11.17.08.16.36;	author svnexp;	state Exp;
branches;
next	;

1.340.6.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.340.8.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.340.10.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.336.2.1
date	2005.12.21.07.11.33;	author dougb;	state Exp;
branches;
next	1.336.2.2;

1.336.2.2
date	2006.02.24.21.42.43;	author dougb;	state Exp;
branches;
next	1.336.2.3;

1.336.2.3
date	2007.05.24.16.14.36;	author des;	state Exp;
branches
	1.336.2.3.4.1;
next	1.336.2.4;

1.336.2.4
date	2012.11.17.07.39.02;	author svnexp;	state Exp;
branches;
next	;

1.336.2.3.4.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.333.2.1
date	2004.10.10.09.50.53;	author mtm;	state Exp;
branches;
next	;

1.212.2.1
date	2000.05.11.06.35.13;	author davidn;	state Exp;
branches;
next	1.212.2.2;

1.212.2.2
date	2000.05.28.14.07.40;	author asmodai;	state Exp;
branches;
next	1.212.2.3;

1.212.2.3
date	2000.05.28.19.17.15;	author asmodai;	state Exp;
branches;
next	1.212.2.4;

1.212.2.4
date	2000.06.27.09.43.30;	author asmodai;	state Exp;
branches;
next	1.212.2.5;

1.212.2.5
date	2000.08.15.11.02.11;	author brian;	state Exp;
branches;
next	1.212.2.6;

1.212.2.6
date	2000.08.15.18.06.13;	author obrien;	state Exp;
branches;
next	1.212.2.7;

1.212.2.7
date	2000.08.18.09.22.02;	author sheldonh;	state Exp;
branches;
next	1.212.2.8;

1.212.2.8
date	2000.10.30.10.40.10;	author obrien;	state Exp;
branches;
next	1.212.2.9;

1.212.2.9
date	2000.12.07.15.19.17;	author ru;	state Exp;
branches;
next	1.212.2.10;

1.212.2.10
date	2000.12.16.06.55.45;	author dougb;	state Exp;
branches;
next	1.212.2.11;

1.212.2.11
date	2001.01.14.09.45.24;	author dougb;	state Exp;
branches;
next	1.212.2.12;

1.212.2.12
date	2001.01.28.20.57.30;	author jdp;	state Exp;
branches;
next	1.212.2.13;

1.212.2.13
date	2001.02.13.22.31.19;	author brian;	state Exp;
branches;
next	1.212.2.14;

1.212.2.14
date	2001.02.27.20.03.28;	author jhb;	state Exp;
branches;
next	1.212.2.15;

1.212.2.15
date	2001.02.28.18.44.47;	author obrien;	state Exp;
branches;
next	1.212.2.16;

1.212.2.16
date	2001.03.05.05.56.41;	author dougb;	state Exp;
branches;
next	1.212.2.17;

1.212.2.17
date	2001.03.05.06.04.12;	author dougb;	state Exp;
branches;
next	1.212.2.18;

1.212.2.18
date	2001.03.06.01.58.44;	author obrien;	state Exp;
branches;
next	1.212.2.19;

1.212.2.19
date	2001.03.06.02.06.05;	author obrien;	state Exp;
branches;
next	1.212.2.20;

1.212.2.20
date	2001.03.06.02.13.30;	author obrien;	state Exp;
branches;
next	1.212.2.21;

1.212.2.21
date	2001.03.07.20.13.56;	author jkh;	state Exp;
branches;
next	1.212.2.22;

1.212.2.22
date	2001.04.14.02.32.22;	author jkh;	state Exp;
branches;
next	1.212.2.23;

1.212.2.23
date	2001.04.17.15.52.28;	author luigi;	state Exp;
branches;
next	1.212.2.24;

1.212.2.24
date	2001.04.25.09.19.03;	author nik;	state Exp;
branches;
next	1.212.2.25;

1.212.2.25
date	2001.05.09.07.24.47;	author brian;	state Exp;
branches;
next	1.212.2.26;

1.212.2.26
date	2001.05.30.13.15.06;	author yar;	state Exp;
branches;
next	1.212.2.27;

1.212.2.27
date	2001.05.31.21.12.23;	author brian;	state Exp;
branches;
next	1.212.2.28;

1.212.2.28
date	2001.06.09.09.50.20;	author sheldonh;	state Exp;
branches;
next	1.212.2.29;

1.212.2.29
date	2001.06.10.12.10.13;	author sheldonh;	state Exp;
branches;
next	1.212.2.30;

1.212.2.30
date	2001.07.23.10.02.12;	author dd;	state Exp;
branches;
next	1.212.2.31;

1.212.2.31
date	2001.07.24.09.49.37;	author dd;	state Exp;
branches;
next	1.212.2.32;

1.212.2.32
date	2001.07.31.16.16.28;	author roam;	state Exp;
branches;
next	1.212.2.33;

1.212.2.33
date	2001.08.01.19.50.33;	author obrien;	state Exp;
branches;
next	1.212.2.34;

1.212.2.34
date	2001.08.01.19.59.05;	author obrien;	state Exp;
branches
	1.212.2.34.2.1;
next	1.212.2.35;

1.212.2.35
date	2001.11.27.13.53.42;	author des;	state Exp;
branches;
next	1.212.2.36;

1.212.2.36
date	2001.12.12.19.52.46;	author phk;	state Exp;
branches;
next	1.212.2.37;

1.212.2.37
date	2001.12.19.14.40.28;	author roam;	state Exp;
branches;
next	1.212.2.38;

1.212.2.38
date	2001.12.19.17.52.17;	author ru;	state Exp;
branches
	1.212.2.38.2.1;
next	1.212.2.39;

1.212.2.39
date	2002.02.09.03.11.30;	author nyan;	state Exp;
branches;
next	1.212.2.40;

1.212.2.40
date	2002.02.18.13.19.35;	author cjc;	state Exp;
branches;
next	1.212.2.41;

1.212.2.41
date	2002.02.27.10.36.03;	author sheldonh;	state Exp;
branches;
next	1.212.2.42;

1.212.2.42
date	2002.03.04.08.37.33;	author sheldonh;	state Exp;
branches;
next	1.212.2.43;

1.212.2.43
date	2002.03.07.18.10.02;	author sheldonh;	state Exp;
branches;
next	1.212.2.44;

1.212.2.44
date	2002.03.17.09.52.31;	author cjc;	state Exp;
branches;
next	1.212.2.45;

1.212.2.45
date	2002.03.25.21.41.28;	author gshapiro;	state Exp;
branches;
next	1.212.2.46;

1.212.2.46
date	2002.04.05.01.58.22;	author gshapiro;	state Exp;
branches;
next	1.212.2.47;

1.212.2.47
date	2002.04.11.23.25.50;	author gshapiro;	state Exp;
branches;
next	1.212.2.48;

1.212.2.48
date	2002.04.15.00.44.13;	author dougb;	state Exp;
branches;
next	1.212.2.49;

1.212.2.49
date	2002.04.28.22.49.59;	author wes;	state Exp;
branches;
next	1.212.2.50;

1.212.2.50
date	2002.05.09.17.39.01;	author nectar;	state Exp;
branches;
next	1.212.2.51;

1.212.2.51
date	2002.10.17.17.25.07;	author schweikh;	state Exp;
branches
	1.212.2.51.8.1;
next	1.212.2.52;

1.212.2.52
date	2005.01.13.21.50.14;	author anholt;	state Exp;
branches;
next	1.212.2.53;

1.212.2.53
date	2012.11.17.07.22.36;	author svnexp;	state Exp;
branches;
next	;

1.212.2.34.2.1
date	2002.05.09.17.41.05;	author nectar;	state Exp;
branches;
next	;

1.212.2.38.2.1
date	2002.05.09.17.40.27;	author nectar;	state Exp;
branches;
next	;

1.212.2.51.8.1
date	2005.01.13.22.09.17;	author anholt;	state Exp;
branches;
next	;

1.169.2.1
date	99.01.31.04.35.36;	author grog;	state Exp;
branches;
next	1.169.2.2;

1.169.2.2
date	99.02.10.18.08.38;	author jkh;	state Exp;
branches;
next	1.169.2.3;

1.169.2.3
date	99.02.11.22.03.27;	author dillon;	state Exp;
branches;
next	1.169.2.4;

1.169.2.4
date	99.02.11.23.05.00;	author jkh;	state Exp;
branches;
next	1.169.2.5;

1.169.2.5
date	99.02.13.05.31.07;	author jkh;	state Exp;
branches;
next	1.169.2.6;

1.169.2.6
date	99.03.09.15.01.24;	author luigi;	state Exp;
branches;
next	1.169.2.7;

1.169.2.7
date	99.03.14.03.21.39;	author des;	state Exp;
branches;
next	1.169.2.8;

1.169.2.8
date	99.03.14.20.30.08;	author des;	state Exp;
branches;
next	1.169.2.9;

1.169.2.9
date	99.03.17.20.04.56;	author billf;	state Exp;
branches;
next	1.169.2.10;

1.169.2.10
date	99.04.12.15.55.56;	author cracauer;	state Exp;
branches;
next	1.169.2.11;

1.169.2.11
date	99.05.03.08.13.26;	author grog;	state Exp;
branches;
next	1.169.2.12;

1.169.2.12
date	99.06.01.13.27.37;	author brian;	state Exp;
branches;
next	1.169.2.13;

1.169.2.13
date	99.06.21.16.05.14;	author sheldonh;	state Exp;
branches;
next	1.169.2.14;

1.169.2.14
date	99.08.02.05.47.09;	author imp;	state Exp;
branches;
next	1.169.2.15;

1.169.2.15
date	99.08.29.14.18.54;	author peter;	state Exp;
branches;
next	1.169.2.16;

1.169.2.16
date	99.09.02.08.53.31;	author imp;	state Exp;
branches;
next	1.169.2.17;

1.169.2.17
date	99.09.12.22.44.16;	author roberto;	state Exp;
branches;
next	1.169.2.18;

1.169.2.18
date	99.11.24.03.52.00;	author jkoshy;	state Exp;
branches;
next	1.169.2.19;

1.169.2.19
date	2000.01.05.09.16.48;	author peter;	state Exp;
branches;
next	1.169.2.20;

1.169.2.20
date	2000.01.06.14.29.08;	author peter;	state Exp;
branches;
next	1.169.2.21;

1.169.2.21
date	2000.05.11.06.36.27;	author davidn;	state Exp;
branches;
next	;

1.104.2.1
date	96.11.04.10.05.59;	author phk;	state Exp;
branches;
next	1.104.2.2;

1.104.2.2
date	96.11.16.21.03.12;	author phk;	state Exp;
branches;
next	1.104.2.3;

1.104.2.3
date	96.12.19.18.08.00;	author joerg;	state Exp;
branches;
next	1.104.2.4;

1.104.2.4
date	96.12.23.00.36.58;	author joerg;	state Exp;
branches;
next	1.104.2.5;

1.104.2.5
date	97.01.03.08.18.58;	author phk;	state Exp;
branches;
next	1.104.2.6;

1.104.2.6
date	97.04.01.00.59.48;	author pst;	state Exp;
branches;
next	1.104.2.7;

1.104.2.7
date	97.04.09.20.30.58;	author guido;	state Exp;
branches;
next	1.104.2.8;

1.104.2.8
date	97.04.26.22.39.33;	author jkh;	state Exp;
branches;
next	1.104.2.9;

1.104.2.9
date	97.04.27.11.13.38;	author jkh;	state Exp;
branches;
next	1.104.2.10;

1.104.2.10
date	97.05.01.04.41.04;	author jkh;	state Exp;
branches;
next	1.104.2.11;

1.104.2.11
date	97.05.01.06.01.35;	author jkh;	state Exp;
branches;
next	1.104.2.12;

1.104.2.12
date	97.05.04.13.13.10;	author andreas;	state Exp;
branches;
next	1.104.2.13;

1.104.2.13
date	97.05.04.22.35.26;	author andreas;	state Exp;
branches;
next	1.104.2.14;

1.104.2.14
date	97.05.05.07.09.04;	author jkh;	state Exp;
branches;
next	1.104.2.15;

1.104.2.15
date	97.05.18.13.18.02;	author peter;	state Exp;
branches;
next	1.104.2.16;

1.104.2.16
date	97.05.19.08.02.37;	author jkh;	state Exp;
branches;
next	1.104.2.17;

1.104.2.17
date	97.06.18.16.02.33;	author pst;	state Exp;
branches;
next	1.104.2.18;

1.104.2.18
date	97.06.25.03.10.15;	author dima;	state Exp;
branches;
next	1.104.2.19;

1.104.2.19
date	97.06.25.11.49.25;	author pst;	state Exp;
branches;
next	1.104.2.20;

1.104.2.20
date	97.06.25.12.31.36;	author ache;	state Exp;
branches;
next	1.104.2.21;

1.104.2.21
date	97.07.13.13.23.40;	author jkh;	state Exp;
branches;
next	1.104.2.22;

1.104.2.22
date	97.09.13.09.30.58;	author brian;	state Exp;
branches;
next	1.104.2.23;

1.104.2.23
date	97.09.13.21.08.29;	author brian;	state Exp;
branches;
next	1.104.2.24;

1.104.2.24
date	97.09.21.16.10.34;	author joerg;	state Exp;
branches;
next	1.104.2.25;

1.104.2.25
date	97.11.24.04.31.45;	author obrien;	state Exp;
branches;
next	1.104.2.26;

1.104.2.26
date	97.11.24.09.24.19;	author obrien;	state Exp;
branches;
next	1.104.2.27;

1.104.2.27
date	97.11.30.01.33.22;	author obrien;	state Exp;
branches;
next	1.104.2.28;

1.104.2.28
date	97.12.09.07.24.35;	author danny;	state Exp;
branches;
next	1.104.2.29;

1.104.2.29
date	97.12.09.10.05.04;	author danny;	state Exp;
branches;
next	1.104.2.30;

1.104.2.30
date	98.01.29.10.50.21;	author obrien;	state Exp;
branches;
next	1.104.2.31;

1.104.2.31
date	98.01.29.11.01.28;	author obrien;	state Exp;
branches;
next	1.104.2.32;

1.104.2.32
date	98.01.29.11.17.44;	author obrien;	state Exp;
branches;
next	1.104.2.33;

1.104.2.33
date	98.02.15.14.24.47;	author jkh;	state Exp;
branches;
next	1.104.2.34;

1.104.2.34
date	98.06.04.00.20.34;	author mph;	state Exp;
branches;
next	1.104.2.35;

1.104.2.35
date	98.08.12.23.49.09;	author brian;	state Exp;
branches;
next	1.104.2.36;

1.104.2.36
date	98.09.09.10.37.41;	author cracauer;	state Exp;
branches;
next	1.104.2.37;

1.104.2.37
date	98.09.16.22.43.36;	author brian;	state Exp;
branches;
next	1.104.2.38;

1.104.2.38
date	98.11.03.16.35.46;	author cracauer;	state Exp;
branches;
next	1.104.2.39;

1.104.2.39
date	99.08.04.19.03.30;	author dima;	state Exp;
branches;
next	1.104.2.40;

1.104.2.40
date	99.09.05.11.01.58;	author peter;	state Exp;
branches;
next	1.104.2.41;

1.104.2.41
date	2000.01.05.09.18.20;	author peter;	state Exp;
branches;
next	1.104.2.42;

1.104.2.42
date	2000.01.06.14.30.24;	author peter;	state Exp;
branches;
next	;

1.66.4.1
date	95.08.25.03.37.21;	author davidg;	state Exp;
branches;
next	1.66.4.2;

1.66.4.2
date	95.09.14.23.16.33;	author jkh;	state Exp;
branches;
next	1.66.4.3;

1.66.4.3
date	95.09.19.08.30.39;	author jkh;	state Exp;
branches;
next	1.66.4.4;

1.66.4.4
date	95.09.19.10.23.38;	author jkh;	state Exp;
branches;
next	1.66.4.5;

1.66.4.5
date	95.09.19.12.09.01;	author jkh;	state Exp;
branches;
next	1.66.4.6;

1.66.4.6
date	95.10.19.08.07.09;	author jkh;	state Exp;
branches;
next	1.66.4.7;

1.66.4.7
date	95.10.30.08.30.31;	author davidg;	state Exp;
branches;
next	1.66.4.8;

1.66.4.8
date	96.01.29.14.46.47;	author gpalmer;	state Exp;
branches;
next	1.66.4.9;

1.66.4.9
date	96.03.22.17.26.47;	author nate;	state Exp;
branches;
next	1.66.4.10;

1.66.4.10
date	96.05.03.06.02.34;	author asami;	state Exp;
branches;
next	1.66.4.11;

1.66.4.11
date	96.05.29.22.23.38;	author jkh;	state Exp;
branches;
next	1.66.4.12;

1.66.4.12
date	96.06.05.02.36.34;	author jkh;	state Exp;
branches;
next	1.66.4.13;

1.66.4.13
date	96.06.17.09.17.10;	author jkh;	state Exp;
branches;
next	1.66.4.14;

1.66.4.14
date	96.06.19.21.41.56;	author nate;	state Exp;
branches;
next	1.66.4.15;

1.66.4.15
date	96.06.25.14.56.02;	author joerg;	state Exp;
branches;
next	1.66.4.16;

1.66.4.16
date	97.03.12.01.21.35;	author jkh;	state Exp;
branches;
next	1.66.4.17;

1.66.4.17
date	99.09.05.11.02.52;	author peter;	state Exp;
branches;
next	;

1.19.2.1
date	94.03.06.08.43.37;	author rgrimes;	state Exp;
branches;
next	1.19.2.2;

1.19.2.2
date	94.04.18.04.14.19;	author rgrimes;	state Exp;
branches;
next	;

1.1.1.1
date	93.06.20.13.41.40;	author rgrimes;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2001.06.22.17.27.58;	author obrien;	state Exp;
branches;
next	;


desc
@@


1.346
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/250804
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@#!/bin/sh
#
# Copyright (c) 2000-2004  The FreeBSD Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
#	@@(#)rc	5.27 (Berkeley) 6/5/91
# $FreeBSD: head/etc/rc 250804 2013-05-19 04:10:34Z jamie $
#

# System startup script run by init on autoboot
# or after single-user.
# Output and error are redirected to console by init,
# and the console is the controlling terminal.

# Note that almost all of the user-configurable behavior is no longer in
# this file, but rather in /etc/defaults/rc.conf.  Please check that file
# first before contemplating any changes here.  If you do need to change
# this file for some reason, we would like to know about it.

stty status '^T' 2> /dev/null

# Set shell to ignore SIGINT (2), but not children;
# shell catches SIGQUIT (3) and returns to single user.
#
trap : 2
trap "echo 'Boot interrupted'; exit 1" 3

HOME=/
PATH=/sbin:/bin:/usr/sbin:/usr/bin
export HOME PATH

if [ "$1" = autoboot ]; then
	autoboot=yes
	_boot="faststart"
	rc_fast=yes        # run_rc_command(): do fast booting
else
	autoboot=no
	_boot="quietstart"
fi

dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
if [ ${dlv:=0} -ne 0 -o -f /etc/diskless ]; then
	sh /etc/rc.initdiskless
fi

# Run these after determining whether we are booting diskless in order
# to minimize the number of files that are needed on a diskless system,
# and to make the configuration file variables available to rc itself.
#
. /etc/rc.subr
load_rc_config 'XXX'

skip="-s nostart"
if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then
	skip="$skip -s nojail"
	if [ "$early_late_divider" = "FILESYSTEMS" ]; then
		early_late_divider=NETWORKING
	fi
	if [ `/sbin/sysctl -n security.jail.vnet` -ne 1 ]; then
		skip="$skip -s nojailvnet"
	fi
fi

# Do a first pass to get everything up to $early_late_divider so that
# we can do a second pass that includes $local_startup directories
#
files=`rcorder ${skip} /etc/rc.d/* 2>/dev/null`

_rc_elem_done=' '
for _rc_elem in ${files}; do
	run_rc_script ${_rc_elem} ${_boot}
	_rc_elem_done="${_rc_elem_done}${_rc_elem} "

	case "$_rc_elem" in
	*/${early_late_divider})	break ;;
	esac
done

unset files local_rc

# Now that disks are mounted, for each dir in $local_startup
# search for init scripts that use the new rc.d semantics.
#
case ${local_startup} in
[Nn][Oo] | '') ;;
*)	find_local_scripts_new ;;
esac

files=`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null`
for _rc_elem in ${files}; do
	case "$_rc_elem_done" in
	*" $_rc_elem "*)	continue ;;
	esac

	run_rc_script ${_rc_elem} ${_boot}
done

echo ''
date
exit 0
@


1.345
log
@Switching exporter and resync
@
text
@d28 1
a28 1
# $FreeBSD: head/etc/rc 232976 2012-03-14 16:10:39Z ed $
d80 3
@


1.345.2.1
log
@file rc was added on branch RELENG_8_4 on 2013-03-28 13:02:41 +0000
@
text
@d1 118
@


1.345.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 118
#!/bin/sh
#
# Copyright (c) 2000-2004  The FreeBSD Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
#	@@(#)rc	5.27 (Berkeley) 6/5/91
# $FreeBSD: releng/8.4/etc/rc 221927 2011-05-14 21:31:18Z dougb $
#

# System startup script run by init on autoboot
# or after single-user.
# Output and error are redirected to console by init,
# and the console is the controlling terminal.

# Note that almost all of the user-configurable behavior is no longer in
# this file, but rather in /etc/defaults/rc.conf.  Please check that file
# first before contemplating any changes here.  If you do need to change
# this file for some reason, we would like to know about it.

stty status '^T'

# Set shell to ignore SIGINT (2), but not children;
# shell catches SIGQUIT (3) and returns to single user.
#
trap : 2
trap "echo 'Boot interrupted'; exit 1" 3

HOME=/
PATH=/sbin:/bin:/usr/sbin:/usr/bin
export HOME PATH

if [ "$1" = autoboot ]; then
	autoboot=yes
	_boot="faststart"
	rc_fast=yes        # run_rc_command(): do fast booting
else
	autoboot=no
	_boot="quietstart"
fi

dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
if [ ${dlv:=0} -ne 0 -o -f /etc/diskless ]; then
	sh /etc/rc.initdiskless
fi

# Run these after determining whether we are booting diskless in order
# to minimize the number of files that are needed on a diskless system,
# and to make the configuration file variables available to rc itself.
#
. /etc/rc.subr
load_rc_config 'XXX'

skip="-s nostart"
if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then
	skip="$skip -s nojail"
	if [ "$early_late_divider" = "FILESYSTEMS" ]; then
		early_late_divider=NETWORKING
	fi
fi

# Do a first pass to get everything up to $early_late_divider so that
# we can do a second pass that includes $local_startup directories
#
files=`rcorder ${skip} /etc/rc.d/* 2>/dev/null`

_rc_elem_done=' '
for _rc_elem in ${files}; do
	run_rc_script ${_rc_elem} ${_boot}
	_rc_elem_done="${_rc_elem_done}${_rc_elem} "

	case "$_rc_elem" in
	*/${early_late_divider})	break ;;
	esac
done

unset files local_rc

# Now that disks are mounted, for each dir in $local_startup
# search for init scripts that use the new rc.d semantics.
#
case ${local_startup} in
[Nn][Oo] | '') ;;
*)	find_local_scripts_new ;;
esac

files=`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null`
for _rc_elem in ${files}; do
	case "$_rc_elem_done" in
	*" $_rc_elem "*)	continue ;;
	esac

	run_rc_script ${_rc_elem} ${_boot}
done

echo ''
date
exit 0
@


1.344
log
@SVN rev 232976 on 2012-03-14 16:10:39Z by ed

Hide stty(1) errors.

If rc(8) is executed without using a TTY, this error appears at the
beginning:

	stty: stdin isn't a terminal

Because this is to be expected and of course not harmful, it is better
to simply hide the error message.

MFC after:	1 week
@
text
@d28 1
a28 1
# $FreeBSD$
@


1.343
log
@SVN rev 221227 on 2011-04-29 21:10:41Z by dougb

Rather than trusting that nothing is going to sneak in before the
early_late_divider in the second run (and thus be skipped altogether),
keep a list of the scripts run early, and use that list to skip things
in the second run.

This has the primary benefit of not skipping a local script that gets
ordered too early in the second run. It also gives an opportunity to
clean up/simplify the code a bit.

Use a space-separated list rather than the more traditional colon for
maximum insurance against creativity in local naming conventions.

Reviewed by:	brooks
@
text
@d41 1
a41 1
stty status '^T'
@


1.343.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.343.2.2
log
@SVN rev 233943 on 2012-04-06 11:07:44Z by ed

MFC r232976:

  Hide stty(1) errors.

  If rc(8) is executed without using a TTY, this error appears at the
  beginning:

        stty: stdin isn't a terminal

  Because this is to be expected and of course not harmful, it is better
  to simply hide the error message.
@
text
@d41 1
a41 1
stty status '^T' 2> /dev/null
@


1.343.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d28 1
a28 1
# $FreeBSD: stable/9/etc/rc 233943 2012-04-06 11:07:44Z ed $
@


1.343.2.4
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/250915
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d28 1
a28 1
# $FreeBSD: stable/9/etc/rc 250915 2013-05-22 18:26:12Z jamie $
a79 3
	if [ `/sbin/sysctl -n security.jail.vnet` -ne 1 ]; then
		skip="$skip -s nojailvnet"
	fi
@


1.343.2.5
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/256917
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d28 1
a28 1
# $FreeBSD: stable/9/etc/rc 256917 2013-10-22 16:13:15Z cperciva $
a84 5
# If the firstboot sentinel doesn't exist, we want to skip firstboot scripts.
if ! [ -e ${firstboot_sentinel} ]; then
	skip_firstboot="-s firstboot"
fi

d88 1
a88 1
files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null`
d110 1
a110 7
# The firstboot sentinel might be on a newly mounted filesystem; look for it
# again and unset skip_firstboot if we find it.
if [ -e ${firstboot_sentinel} ]; then
	skip_firstboot=""
fi

files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} 2>/dev/null`
a118 9
# Remove the firstboot sentinel, and reboot if it was requested.
if [ -e ${firstboot_sentinel} ]; then
	rm ${firstboot_sentinel}
	if [ -e ${firstboot_sentinel}-reboot ]; then
		rm ${firstboot_sentinel}-reboot
		kill -INT 1
	fi
fi

@


1.343.2.6
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/260432
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d28 1
a28 1
# $FreeBSD: stable/9/etc/rc 260432 2014-01-08 02:30:24Z cperciva $
a73 5
# If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d
# scripts to perform "boot-time configuration" including enabling and
# disabling rc.d scripts which appear later in the boot order.
trap "_rc_conf_loaded=false; load_rc_config 'XXX'" ALRM

@


1.343.2.2.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.343.2.2.2.2
log
@Switch importer
@
text
@d28 1
a28 1
# $FreeBSD: releng/9.1/etc/rc 233943 2012-04-06 11:07:44Z ed $
@


1.343.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.343.2.1.2.2
log
@Switch importer
@
text
@d28 1
a28 1
# $FreeBSD: releng/9.0/etc/rc 221227 2011-04-29 21:10:41Z dougb $
@


1.342
log
@SVN rev 179942 on 2008-06-23 04:18:22Z by mtm

Remove pointless informational message.
@
text
@d87 1
d90 1
a107 1
_skip_early=1
d109 2
a110 6
	case "$_skip_early" in
	1)	case "$_rc_elem" in
		*/${early_late_divider})	_skip_early=0 ;;
		esac
		continue
		;;
@


1.342.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.342.2.2
log
@SVN rev 221927 on 2011-05-14 21:31:18Z by dougb

MFC r221227:

Keep a list of the scripts run before early_late_divider, and use that list
to skip things in the second run.
@
text
@a86 1
_rc_elem_done=' '
a88 1
	_rc_elem_done="${_rc_elem_done}${_rc_elem} "
d106 1
d108 6
a113 2
	case "$_rc_elem_done" in
	*" $_rc_elem "*)	continue ;;
@


1.342.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d28 1
a28 1
# $FreeBSD: stable/8/etc/rc 221927 2011-05-14 21:31:18Z dougb $
@


1.342.2.2.2.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.342.2.2.2.2
log
@Switch importer
@
text
@d28 1
a28 1
# $FreeBSD: releng/8.3/etc/rc 221927 2011-05-14 21:31:18Z dougb $
@


1.342.2.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.342.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.342.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.341
log
@Re-implement: do not silently fail when a command is not carried
out because the rc.conf(5) variable was not enabled. Display a
message that the command wasn't run and offer suggestions on
what the user can do.

Implement a quiet prefix, which will disable some diagnostics. The
fast prefix also implies quiet. During boot we use either fast or
quiet. For shutdown we already use 'faststop'. So, this informational
message should only appear during interactive use.

An additional benefit of having a quiet prefix is that we can start
putting some of our diagnostic messages behind this knob and start
"de-cluttering" the console during boot and shutdown.
@
text
@a71 1
echo "Loading configuration files."
@


1.340
log
@Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal
and takes over mountcritlocal's role as the early / late divider.  This
makes it far easier to add rc scripts which need to run early, such as a
startup script for zfs, which is right around the corner.

This change should be a no-op; I have verified that the only change in
rcorder's output is the insertion of FILESYSTEMS immediately after
mountcritlocal.

MFC after:	3 weeks
@
text
@d59 1
a59 1
	_boot="start"
@


1.340.2.1
log
@SVN rev 209798 on 2010-07-08 13:34:01Z by jhb

MFC 175676:
Implement a quiet prefix, which will disable some diagnostics. The
fast prefix also implies quiet. During boot we use either fast or
quiet. For shutdown we already use 'faststop'. So, this informational
message should only appear during interactive use.

Reviewed by:	silence on freebsd-rc@@
@
text
@d59 1
a59 1
	_boot="quietstart"
@


1.340.2.2
log
@SVN rev 221928 on 2011-05-14 21:34:21Z by dougb

MFC r221227:

Keep a list of the scripts run before early_late_divider, and use that list
to skip things in the second run.
@
text
@a87 1
_rc_elem_done=' '
a89 1
	_rc_elem_done="${_rc_elem_done}${_rc_elem} "
d107 1
d109 6
a114 2
	case "$_rc_elem_done" in
	*" $_rc_elem "*)	continue ;;
@


1.340.2.3
log
@Switch importer
@
text
@d28 1
a28 1
# $FreeBSD: stable/7/etc/rc 221928 2011-05-14 21:34:21Z dougb $
@


1.340.2.1.2.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.340.2.1.2.2
log
@Switch importer
@
text
@d28 1
a28 1
# $FreeBSD: releng/7.4/etc/rc 209798 2010-07-08 13:34:01Z jhb $
@


1.340.10.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.340.8.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.340.6.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.339
log
@Attempt to make running the new rc in a jail more automatic by
resetting of early_late_divider to a more appropriate value if
the admin has not modified the default.

Reviewed by:	brooks
@
text
@d78 1
a78 1
	if [ "$early_late_divider" = "mountcritlocal" ]; then
@


1.338
log
@Remove rcconf.sh from /etc/rc.d, and instead load the configuration
as part of rc. Doing this, and the sourcing of rc.subr after we have
determined if we are booting diskless (and correspondingly run
rc.initdiskless if necessary) are safe, and actually allow fewer files
to be needed on the diskless box. This also allows variables from
the configuration to be available to rc itself, such as ...

Add a variable to rc.conf, early_late_divider, which designates the
script which separates the early and late stages of the boot process.
Default this to mountcritlocal, and add text to etc/defaults/rc.conf,
rc.conf(5) and diskless(8) which describes how and why one might want
to change this.

Reviewed by:	brooks
@
text
@d76 6
a81 1
[ `/sbin/sysctl -n security.jail.jailed` -eq 1 ] && skip="$skip -s nojail"
@


1.337
log
@Introduce startup scripts from the local_startup directories to
the base rcorder. This is accomplished by running rcorder twice,
first to get all the disks mounted (through mountcritremote),
then again to include the local_startup directories.

This dramatically changes the behavior of rc.d/localpkg, as
all "local" scripts that have the new rc.d semantics are now
run in the base rcorder, so only scripts that have not been
converted yet will run in rc.d/localpkg.

Make a similar change in rc.shutdown, and add some functions in
rc.subr to support these changes.

Bump __FreeBSD_version to reflect this change.
@
text
@a52 6
. /etc/rc.subr

# Note: the system configuration files are loaded as part of
# the rc.d system (rc.d/rcconf.sh).  Do not load them here as it may
# interfere with diskless booting.
#
d67 8
d78 1
a78 1
# Do a first pass to get everything up to mountcritremote so that
d87 1
a87 1
	*/mountcritremote)	break ;;
d106 1
a106 1
		*/mountcritremote)	_skip_early=0 ;;
@


1.336
log
@To allow /etc to be as minimal as possible in a diskless setup, we need
to run initdiskless before we run rcorder on /etc/rc.d.  To allow this,
move /etc/rc.d/initdiskless to /etc/rc.initdiskless and run it directly
from /etc/rc.

Remove /etc/rc.d/preseedrandom as it is no longer necessicary (we start
with entropy unblocked) and was only used by initdiskless when it
was needed.

Discussed on:	freebsd-rc
Repocopy by:	peter
@
text
@d56 1
a56 1
# the RCNG system (rc.d/rcconf.sh).  Do not load them here as it may
d75 4
d83 28
@


1.336.2.1
log
@MFC the inclusion of scripts from the local_startup directories
into the base rcorder, and related changes.
@
text
@d53 6
a72 8
# Run these after determining whether we are booting diskless in order
# to minimize the number of files that are needed on a diskless system,
# and to make the configuration file variables available to rc itself.
#
. /etc/rc.subr
echo "Loading configuration files."
load_rc_config 'XXX'

a74 4

# Do a first pass to get everything up to $early_late_divider so that
# we can do a second pass that includes $local_startup directories
#
a78 28

	case "$_rc_elem" in
	*/${early_late_divider})	break ;;
	esac
done

unset files local_rc

# Now that disks are mounted, for each dir in $local_startup
# search for init scripts that use the new rc.d semantics.
#
case ${local_startup} in
[Nn][Oo] | '') ;;
*)	find_local_scripts_new ;;
esac

files=`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null`
_skip_early=1
for _rc_elem in ${files}; do
	case "$_skip_early" in
	1)	case "$_rc_elem" in
		*/${early_late_divider})	_skip_early=0 ;;
		esac
		continue
		;;
	esac

	run_rc_script ${_rc_elem} ${_boot}
@


1.336.2.2
log
@MFC 1.339, fix for running inside a jail

Approved by:	re (mux)
@
text
@d76 1
a76 6
if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then
	skip="$skip -s nojail"
	if [ "$early_late_divider" = "mountcritlocal" ]; then
		early_late_divider=NETWORKING
	fi
fi
@


1.336.2.3
log
@MFC: add FILESYSTEMS
@
text
@d78 1
a78 1
	if [ "$early_late_divider" = "FILESYSTEMS" ]; then
@


1.336.2.4
log
@Switch importer
@
text
@d28 1
a28 1
# $FreeBSD: stable/6/etc/rc 200489 2009-12-14 00:12:07Z dougb $
@


1.336.2.3.4.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.335
log
@Remove an unused variable.

Submitted by: Pawel Worach <pawel.worach@@telia.com>
@
text
@d68 5
@


1.334
log
@Remove the requirement for the FreeBSD keyword as it no longer
makes any sense.

Discussed with: dougb, brooks
MFC after: 3 days
@
text
@a67 1
os=`eval ${CMD_OSTYPE}`
@


1.333
log
@Correct typo.

Submitted by: eik (and probably many others)
@
text
@d71 1
a71 1
files=`rcorder -k ${os} ${skip} /etc/rc.d/* 2>/dev/null`
@


1.333.2.1
log
@RCS file: /home/ncvs/src/etc/rc,v
----------------------------
revision 1.335
date: 2004/10/08 14:23:49;  author: mtm;  state: Exp;  lines: +0 -1
Remove an unused variable.

Submitted by: Pawel Worach <pawel.worach@@telia.com>
----------------------------
revision 1.334
date: 2004/10/07 13:55:25;  author: mtm;  state: Exp;  lines: +1 -1
Remove the requirement for the FreeBSD keyword as it no longer
makes any sense.

Discussed with: dougb, brooks
MFC after: 3 days
=============================================================================
RCS file: /home/ncvs/src/etc/rc.d/nsswitch,v
----------------------------
revision 1.4
date: 2004/09/16 17:03:12;  author: keramida;  state: Exp;  lines: +1 -1
Fix requirement of `network' to `NETWORK' because the former isn't
provided by any rc.d script.

Approved by:	mtm
=============================================================================
RCS file: /home/ncvs/src/etc/rc.d/pflog,v
----------------------------
revision 1.3
date: 2004/09/16 17:04:20;  author: keramida;  state: Exp;  lines: +1 -1
We don't have any providers of `beforenetlkm' in FreeBSD.  Remove the
dependency to it from our rc.d scripts.

Approved by:	mtm
=============================================================================

Approved by: re/scottl
@
text
@d68 1
d71 1
a71 1
files=`rcorder ${skip} /etc/rc.d/* 2>/dev/null`
@


1.332
log
@Restore pre-rcNG behaviour:
SIGINT (Ctrl-c) kills the current script
SIGQUIT (Ctrl-\) kills /etc/rc (dropping you into single-user)

Prodded by:	harti
@
text
@d56 1
a56 1
# the RCNG system (rc.d/rccond).  Do not load them here as it may
@


1.331
log
@Fix skipping scripts with given keywords.
Proper syntax is '-s keyword1 -s keyword2', not '-s keyword1 keyword2'.
@
text
@d44 1
a44 1
# shell catches SIGQUIT (3) and returns to single user after fsck.
d47 1
a47 1
trap : 3	# shouldn't be needed
@


1.330
log
@o Add support for detecting a jailed environment. If a script
  cannot or does not want to be executed in a jail the
  KEYWORDS line should contain the nojail keyword.
o Update Copyright

# I suggest people who use jails more extensively than I do
# make commits to the appropriate files.
@
text
@d69 3
a71 3
skip="nostart"
[ `/sbin/sysctl -n security.jail.jailed` -eq 1 ] && skip="$skip nojail"
files=`rcorder -k ${os} -s ${skip} /etc/rc.d/* 2>/dev/null`
@


1.329
log
@Per previous announcement, remove the old version of the rc system.

All functionality from the previous system has been preserved, and
users should still customize their system boot with the familiar
methods, rc.conf, rc.conf.local, rc.firewall, sysctl.conf, etc.

Users who have customized versions of scripts that have been removed
should take great care when upgrading, since the compatibility code
that used those old scripts has also been removed.
@
text
@d3 1
a3 1
# Copyright (c) 2000  The FreeBSD Project
d69 3
a71 1
files=`rcorder -k ${os} -s nostart /etc/rc.d/* 2>/dev/null`
@


1.328
log
@Add a dire warning about the impending demise of the old rc system.

Suggested by:	scottl
@
text
@d53 1
a53 27
# check_rcng() is run in a subshell solely to determine the
# RCNG mode.  We do not want to pollute our variable space
# too soon so the procedure must be run in a subshell.  An
# exit code of 3 indicates RCNG is enabled.
#
check_rcng()
{
	if [ -r /etc/defaults/rc.conf ]; then
		. /etc/defaults/rc.conf
		source_rc_confs
	elif [ -r /etc/rc.conf ]; then
		. /etc/rc.conf
	fi

	# Diskless setups have to depend on a different mechanism since
	# their config files haven't been retargeted yet.
	#
	[ -e /.rcng_yes ] && rc_ng="YES"
	case ${rc_ng} in
	[Yy][Ee][Ss])
		exit 3
		;;
	*)
		exit 0
		;;
	esac
}
d55 8
a62 3
( check_rcng )
if [ $? = 3 ]; then
    rc_ng=YES
d64 2
a65 55
    rc_ng=NO
    echo -n  ; sleep 1 ; echo -n  ; sleep 1 ; echo -n 
    echo ''
    echo '**** The old versions of the rc scripts are deprecated, and'
    echo '     will soon be removed. Make sure to update /etc and'
    echo '     check that rc_ng is YES in /etc/defaults/rc.conf.'
    echo '     Please report any rc problems to freebsd-rc@@yahoogroups.com'
    echo '     and/or freebsd-current@@freebsd.org.'
    echo ''
    sleep 3
fi

case ${rc_ng} in
YES)
	. /etc/rc.subr

	# Note: the system configuration files are loaded as part of
	# the RCNG system (rc.d/rccond).  Do not load them here as it may
	# interfere with diskless booting.
	#
	if [ "$1" = autoboot ]; then
		autoboot=yes
		_boot="faststart"
		rc_fast=yes        # run_rc_command(): do fast booting
	else
		autoboot=no
		_boot="start"
	fi

	os=`eval ${CMD_OSTYPE}`
	files=`rcorder -k ${os} -s nostart /etc/rc.d/* 2>/dev/null`

	for _rc_elem in ${files}; do
		run_rc_script ${_rc_elem} ${_boot}
	done

	echo ''
	date
	exit 0
	;;
*)
	# fall-through to the old rc scripts
	;;
esac

bootmode=$1

# BOOTP diskless boot.  We have to run the rc file early in order to
# retarget various config files.
#
if [ -r /etc/rc.diskless1 ]; then
	dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
	if [ ${dlv:=0} != 0 ]; then
		. /etc/rc.diskless1
	fi
d68 2
a69 227
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/rc.conf ]; then
	. /etc/defaults/rc.conf
	source_rc_confs
elif [ -r /etc/rc.conf ]; then
	. /etc/rc.conf
fi

# XXX - Deprecated variable name support
#	for rpcbind and ntpd
#
[ -n "$portmap_enable" ] && rpcbind_enable="$portmap_enable"
[ -n "$portmap_program" ] && rpcbind_program="$portmap_program"
[ -n "$portmap_flags" ] && rpcbind_flags="$portmap_flags"
[ -n "$single_mountd_enable" ] && mountd_enable="$single_mountd_enable"
[ -n "$xntpd_enable" ] && ntpd_enable="$xntpd_enable"
[ -n "$xntpd_program" ] && ntpd_program="$xntpd_program"
[ -n "$xntpd_flags" ] && ntpd_flags="$xntpd_flags"

feed_dev_random() {
	if [ -f "${1}" -a -r "${1}" -a -s "${1}" ]; then
#		echo "Using ${1} as an entropy file"
		cat "${1}" | dd of=/dev/random bs=8k 2>/dev/null
	fi
}

chkdepend() {
	svc=$1
	svc_var=$2
	dep=$3
	dep_var=$4

	eval svc_val=\${$svc_var}
	eval dep_val=\${$dep_var}

	case ${svc_val} in
	[Yy][Ee][Ss])
		case ${dep_val} in
		[Yy][Ee][Ss])
			;;
		*)
			eval ${dep_var}="YES"
			echo "DEPENDENCY NOTE: ${dep} will be enabled" \
			"to support ${svc}"
			;;
		esac
		;;
	esac
}

chkdepend amd amd_enable        rpcbind rpcbind_enable
chkdepend amd amd_enable        NFS nfs_client_enable
chkdepend NFS nfs_server_enable rpcbind rpcbind_enable
chkdepend NIS nis_server_enable rpcbind rpcbind_enable
chkdepend NIS nis_client_enable rpcbind rpcbind_enable

# Enable dumpdev early so that a crash during the boot process can be caught.
#
case ${dumpdev} in
[Nn][Oo] | '')
	dumpdev='NO'
	;;
*)
	/sbin/dumpon -v ${dumpdev}
	;;
esac

# Enable harvesting of entropy via devices.  The sooner this happens the
# better so that we can take advantage of the boot process.
#
echo -n 'Entropy harvesting:'

case ${harvest_interrupt} in
[Nn][Oo])
	;;
*)
	if [ -w /dev/random ]; then
		/sbin/sysctl kern.random.sys.harvest.interrupt=1 >/dev/null
		echo -n ' interrupts'
	fi
	;;
esac

case ${harvest_ethernet} in
[Nn][Oo])
	;;
*)
	if [ -w /dev/random ]; then
		/sbin/sysctl kern.random.sys.harvest.ethernet=1 >/dev/null
		echo -n ' ethernet'
	fi
	;;
esac

case ${harvest_p_to_p} in
[Nn][Oo])
	;;
*)
	if [ -w /dev/random ]; then
	/sbin/sysctl kern.random.sys.harvest.point_to_point=1 >/dev/null
		echo -n ' point_to_point'
	fi
	;;
esac

echo '.'

# First pass at reseeding /dev/random.
#
case ${entropy_file} in
[Nn][Oo] | '')
	;;
*)
	if [ -w /dev/random ]; then
		feed_dev_random "${entropy_file}"
	fi
	;;
esac

# XXX temporary until we can get the entropy
# harvesting rate up
# Entropy below is not great,
# but better than nothing.
( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww; ) \
    | dd of=/dev/random bs=8k 2>/dev/null
cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null

# Configure ccd devices.
#
if [ -r /etc/ccd.conf ]; then
	ccdconfig -C
fi

case ${start_vinum} in
[Yy][Ee][Ss])
	vinum start
	;;
esac

swapon -a

# Last chance to do things before potentially waiting for
# operator to do fsck related tasks
if [ -r /etc/rc.early ]; then
	. /etc/rc.early
fi

case ${bootmode} in
autoboot)
	echo 'Automatic boot in progress...'
	case ${background_fsck} in
	[Yy][Ee][Ss])
		fsck -F -p
		;;
	*)
		fsck -p
		;;
	esac
	case $? in
	0)
		;;
	2)
		exit 1
		;;
	4)
		reboot
		echo 'Reboot failed... help!'
		exit 1
		;;
	8)
		case ${fsck_y_enable} in
		[Yy][Ee][Ss])
			echo 'File system preen failed, trying fsck -y . . .'
			fsck -y
			case $? in
			0)
				;;
			*)
			echo 'Automatic filesystem check failed . . . help!'
				exit 1
				;;
			esac
			;;
		*)
			echo 'Automatic filesystem check failed . . . help!'
			exit 1
			;;
		esac
		;;
	12)
		echo 'Reboot interrupted'
		exit 1
		;;
	130)
		# interrupt before catcher installed
		exit 1
		;;
	*)
		echo 'Unknown error in reboot'
		exit 1
		;;
	esac
	;;
*)
	echo 'Skipping disk checks ...'
	;;
esac

set -T
trap "echo 'Reboot interrupted'; exit 1" 3

# root normally must be read/write, but if this is a BOOTP NFS
# diskless boot it does not have to be.
#
case ${root_rw_mount} in
[Nn][Oo] | '')
	;;
*)
	if ! mount -u -o rw / ; then
		echo 'Mounting root filesystem rw failed, startup aborted'
		exit 1
	fi
	;;
esac

umount -a >/dev/null 2>&1
d71 2
a72 204
# Set up the list of network filesystem types for which mounting should be
# delayed until after network initialization.
networkfs_types='nfs:NFS smbfs:SMB portalfs:PORTAL'
case ${extra_netfs_types} in
[Nn][Oo])
	;;
*)
	networkfs_types="${networkfs_types} ${extra_netfs_types}"
	;;
esac

# Mount everything except nfs filesystems.
mount_excludes='no'
for i in ${networkfs_types}; do
	fstype=${i%:*}
	mount_excludes="${mount_excludes}${fstype},"
done
mount_excludes=${mount_excludes%,}
mount -a -t ${mount_excludes}

case $? in
0)
	;;
*)
	echo 'Mounting /etc/fstab filesystems failed, startup aborted'
	exit 1
	;;
esac

# Run custom disk mounting function here
#
if [ -n "${diskless_mount}" -a -r "${diskless_mount}" ]; then
		sh ${diskless_mount}
fi

# If we booted a special kernel remove the record so we will boot
# the default kernel next time
rm -f /boot/nextboot.conf

# Reseed /dev/random with previously stored entropy.
case ${entropy_dir} in
[Nn][Oo])
	;;
*)
	entropy_dir=${entropy_dir:-/var/db/entropy}
	if [ -d "${entropy_dir}" ]; then
		if [ -w /dev/random ]; then
			for seedfile in ${entropy_dir}/*; do
				feed_dev_random "${seedfile}"
			done
		fi
	fi
	;;
esac

case ${entropy_file} in
[Nn][Oo] | '')
	;;
*)
	if [ -w /dev/random ]; then
		feed_dev_random "${entropy_file}"
	fi
	;;
esac

adjkerntz -i

purgedir() {
	local dir file

	if [ $# -eq 0 ]; then
		purgedir .
	else
		for dir
		do
		(
			cd "$dir" && for file in .* *
			do
				[ ."$file" = .. -o ."$file" = ... ] && continue
				if [ -d "$file" -a ! -L "$file" ]
				then
					purgedir "$file"
				else
					rm -f -- "$file"
				fi
			done
		)
		done
	fi
}

clean_var() {
	if [ -d /var/run -a ! -f /var/run/clean_var ]; then
		purgedir /var/run
		# Keep a copy of the boot messages around
		dmesg >/var/run/dmesg.boot
		# And an initial utmp file
		(cd /var/run && cp /dev/null utmp && chmod 644 utmp;)
		>/var/run/clean_var
	fi
	if [ -d /var/spool/lock -a ! -f /var/spool/lock/clean_var ]; then
		purgedir /var/spool/lock
		>/var/spool/lock/clean_var
	fi
	rm -rf /var/spool/uucp/.Temp/*
}

# network_pass1() *may* end up writing stuff to /var - we don't want to
# remove it immediately afterwards - *nor* do we want to fail to clean
# an NFS-mounted /var.
rm -f /var/run/clean_var /var/spool/lock/clean_var
clean_var

# Add additional swapfile, if configured.
#
case ${swapfile} in
[Nn][Oo] | '')
	;;
*)
	if [ -w "${swapfile}" -a -c /dev/mdctl ]; then
		echo "Adding ${swapfile} as additional swap"
		mdev=`mdconfig -a -t vnode -f ${swapfile}` && swapon /dev/${mdev}
	fi
	;;
esac

# Early pass to set the variables we can
#
if [ -r /etc/rc.sysctl ]; then
	sh /etc/rc.sysctl first
fi

# Configure serial devices
#
if [ -r /etc/rc.serial ]; then
	. /etc/rc.serial
fi

# Start up PC-card configuration
#
if [ -r /etc/rc.pccard ]; then
	. /etc/rc.pccard
fi

# Start up the initial network configuration.
#
if [ -r /etc/rc.network ]; then
	. /etc/rc.network	# We only need to do this once.
	network_pass1
fi

case ${ipv6_enable} in
[Yy][Ee][Ss])
	if [ -r /etc/rc.network6 ]; then
		. /etc/rc.network6	# We only need to do this once also.
		network6_pass1
	fi
	;;
esac

# Mount NFS filesystems if present in /etc/fstab
#
# XXX When the vfsload() issues with nfsclient support and related sysctls
# have been resolved, this block can be removed, and the condition that
# skips nfs in the following block (for "other network filesystems") can
# be removed.
case "`mount -d -a -t nfs 2> /dev/null`" in
*mount_nfs*)
	# Handle absent nfs client support
	nfsclient_in_kernel=0
	if sysctl vfs.nfs >/dev/null 2>&1; then
		nfsclient_in_kernel=1
	else
		kldload nfsclient && nfsclient_in_kernel=1
	fi

	case ${nfsclient_in_kernel} in
	1)
		echo -n 'Mounting NFS filesystem:'
		mount -a -t nfs
		echo '.'
		;;
	*)
		echo 'Warning: nfs mount requested, but no nfs client in kernel'
		;;
	esac
	;;
esac

# Mount other network filesystems if present in /etc/fstab
for i in ${networkfs_types}; do
	fstype=${i%:*}
	fsdecr=${i#*:}

	if [ "${fstype}" = "nfs" ]; then
		continue
	fi
	case "`mount -d -a -t ${fstype}`" in
	*mount_${fstype}*)
		echo -n "Mounting ${fsdecr} filesystems:"
		mount -a -t ${fstype}
		echo '.'
		;;
	esac
a74 441
# Whack the pty perms back into shape.
#
if ls /dev/tty[pqrsPQRS]* > /dev/null 2>&1; then
	chflags 0 /dev/tty[pqrsPQRS]*
	chmod 666 /dev/tty[pqrsPQRS]*
	chown root:wheel /dev/tty[pqrsPQRS]*
fi

# Clean up left-over files
#
clean_var			# If it hasn't already been done
rm /var/run/clean_var /var/spool/lock/clean_var

# Clearing /tmp at boot-time seems to have a long tradition.  It doesn't
# help in any way for long-living systems, and it might accidentally
# clobber files you would rather like to have preserved after a crash
# (if not using mfs /tmp anyway).
#
# See also the example of another cleanup policy in /etc/periodic/daily.
#
case ${clear_tmp_enable} in
[Yy][Ee][Ss])
	echo -n 'Clearing /tmp:'
	# prune quickly with one rm, then use find to clean up /tmp/[lq]*
	# (not needed with mfs /tmp, but doesn't hurt there...)
	(cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
		find -d . ! -name . ! -name lost+found ! -name quota.user \
		! -name quota.group -exec rm -rf -- {} \;)
	echo '.'
	;;
esac

# Remove X lock files, since they will prevent you from restarting X11
# after a system crash.
#
rm -f /tmp/.X*-lock
rm -fr /tmp/.X11-unix
mkdir -m 1777 /tmp/.X11-unix

# Snapshot any kernel -c changes back to disk here <someday>.
# This has changed with ELF and /kernel.config.

# Load LOMAC(4) security if wanted.
case ${lomac_enable} in
[Yy][Ee][Ss])
	kldload mac_lomac >/dev/null 2>&1
	;;
esac

echo -n 'Additional daemons:'

# Start system logging and name service.  Named needs to start before syslogd
# if you don't have a /etc/resolv.conf.
#
case ${syslogd_enable} in
[Yy][Ee][Ss])
	# Transitional symlink (for the next couple of years :) until all
	# binaries have had a chance to move towards /var/run/log.
	if [ ! -L /dev/log ]; then
		# might complain for r/o root f/s
		ln -sf /var/run/log /dev/log
	fi

	rm -f /var/run/log
	echo -n ' syslogd';
	${syslogd_program:-/usr/sbin/syslogd} ${syslogd_flags}
	;;
esac

echo '.'

# Build device name databases if we are not using DEVFS
#
if sysctl vfs.devfs.generation > /dev/null 2>&1 ; then
	rm -f /var/run/dev.db
else
	dev_mkdb
fi

# $dumpdir should be a directory or a symbolic link
# to the crash directory if core dumps are to be saved.
#
if [ "${dumpdev}" != 'NO' ]; then
	case ${dumpdir} in
	'')
		dumpdir='/var/crash'
		;;
	[Nn][Oo])
		dumpdir='NO'
		;;
	esac

	if [ "${dumpdir}" != 'NO' ]; then
		echo -n 'Checking for core dump: '
		/sbin/savecore ${savecore_flags} "${dumpdir}"
	fi
fi

if [ -n "${network_pass1_done}" ]; then
	network_pass2
fi

# Enable/Check the quotas (must be after ypbind if using NIS)
#
case ${enable_quotas} in
[Yy][Ee][Ss])
	case ${check_quotas} in
	[Yy][Ee][Ss])
		echo -n 'Checking quotas:'
		quotacheck -a
		echo ' done.'
		;;
	esac

	echo -n 'Enabling quotas:'
	quotaon -a
	echo ' done.'
	;;
esac

if [ -n "${network_pass2_done}" ]; then
	network_pass3
fi

# Check the password temp/lock file
#
if [ -e /etc/ptmp ]; then
	logger -s -p auth.err \
	"password file may be incorrect -- /etc/ptmp exists"
fi

case ${accounting_enable} in
[Yy][Ee][Ss])
	if [ -d /var/account ]; then
		echo 'Turning on accounting:'
		if [ ! -e /var/account/acct ]; then
			touch /var/account/acct
		fi
		accton /var/account/acct
	fi
	;;
esac

# Make shared lib searching a little faster.  Leave /usr/lib first if you
# add your own entries or you may come to grief.
#
ldconfig="/sbin/ldconfig"
case ${ldconfig_insecure} in
[Yy][Ee][Ss])
	ldconfig="${ldconfig} -i"
	;;
esac
if [ -x /sbin/ldconfig ]; then
	_LDC=/usr/lib
	for i in ${ldconfig_paths}; do
		if [ -d "${i}" ]; then
			_LDC="${_LDC} ${i}"
		fi
	done
	echo 'ELF ldconfig path:' ${_LDC}
	${ldconfig} ${_LDC}

	# Legacy aout support for i386 only
	case `sysctl -n hw.machine_arch` in
	i386)
		# Default the a.out ldconfig path.
		: ${ldconfig_paths_aout=${ldconfig_paths}}
		_LDC=/usr/lib/aout
		for i in ${ldconfig_paths_aout}; do
			if [ -d "${i}" ]; then
				_LDC="${_LDC} ${i}"
			fi
		done
		echo 'a.out ldconfig path:' ${_LDC}
		${ldconfig} -aout ${_LDC}
		;;
	esac
fi

# Now start up miscellaneous daemons that don't belong anywhere else
#
echo -n 'Starting standard daemons:'
case ${inetd_enable} in
[Nn][Oo])
	;;
*)
	echo -n ' inetd'; ${inetd_program:-/usr/sbin/inetd} ${inetd_flags}
	;;
esac

case ${cron_enable} in
[Nn][Oo])
	;;
*)
	echo -n ' cron';	${cron_program:-/usr/sbin/cron} ${cron_flags}
	;;
esac

case ${lpd_enable} in
[Yy][Ee][Ss])
	echo -n ' printer';	${lpd_program:-/usr/sbin/lpd} ${lpd_flags}
	;;
esac

case ${sshd_enable} in
[Yy][Ee][Ss])
	if [ -x ${sshd_program:-/usr/sbin/sshd} ]; then
		echo -n ' sshd';
		${sshd_program:-/usr/sbin/sshd} ${sshd_flags}
	fi
	;;
esac

case ${usbd_enable} in
[Yy][Ee][Ss])
	echo -n ' usbd';	/usr/sbin/usbd ${usbd_flags}
	;;
esac

case ${mta_start_script} in
/*)
	if [ -r ${mta_start_script} ]; then
		sh ${mta_start_script}
	fi
	;;
esac

echo '.'

# Recover vi editor files.
find /var/tmp/vi.recover ! -type f -a ! -type d -delete
vibackup=`echo /var/tmp/vi.recover/vi.*`
if [ "${vibackup}" != '/var/tmp/vi.recover/vi.*' ]; then
	echo -n 'Recovering vi editor sessions:'
	for i in /var/tmp/vi.recover/vi.*; do
		# Only test files that are readable.
		if [ ! -r "${i}" ]; then
			continue
		fi

		# Unmodified nvi editor backup files either have the
		# execute bit set or are zero length.  Delete them.
		if [ -x "${i}" -o ! -s "${i}" ]; then
			rm -f "${i}"
		fi
	done

	# It is possible to get incomplete recovery files, if the editor
	# crashes at the right time.
	virecovery=`echo /var/tmp/vi.recover/recover.*`
	if [ "${virecovery}" != "/var/tmp/vi.recover/recover.*" ]; then
		for i in /var/tmp/vi.recover/recover.*; do
			# Only test files that are readable.
			if [ ! -r "${i}" ]; then
				continue
			fi

			# Delete any recovery files that are zero length,
			# corrupted, or that have no corresponding backup file.
			# Else send mail to the user.
			recfile=`awk '/^X-vi-recover-path:/{print $2}' < "${i}"`
			if [ -n "${recfile}" -a -s "${recfile}" ]; then
				sendmail -t < "${i}"
			else
				rm -f "${i}"
			fi
		done
	fi
	echo '.'
fi

# Make a bounds file for msgs(1) if there isn't one already
#
if [ -d /var/msgs -a ! -f /var/msgs/bounds -a ! -L /var/msgs/bounds ]; then
	echo 0 > /var/msgs/bounds
fi

case ${update_motd} in
[Nn][Oo] | '')
	;;
*)
	if T=`mktemp /tmp/_motd.XXXXXX`; then
		uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T}
		awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> ${T}
		cmp -s ${T} /etc/motd || {
			cp ${T} /etc/motd
			chmod 644 /etc/motd
		}
		rm -f ${T}
	fi
	;;
esac

# Run rc.devfs if readable to customize devfs
#
if [ -r /etc/rc.devfs ]; then
	sh /etc/rc.devfs
fi

# Configure implementation specific stuff
#
arch=`uname -p`
if [ -r /etc/rc.${arch} ]; then
	. /etc/rc.${arch}
fi

# Configure the system console
#
if [ -r /etc/rc.syscons ]; then
	. /etc/rc.syscons
fi

echo -n 'Additional ABI support:'

# Load the SysV IPC API if requested.
case ${sysvipc_enable} in
[Yy][Ee][Ss])
	echo -n ' sysvipc'
	kldload sysvmsg >/dev/null 2>&1
	kldload sysvsem >/dev/null 2>&1
	kldload sysvshm >/dev/null 2>&1
	;;
esac

# Start the Linux binary compatibility if requested.
#
case ${linux_enable} in
[Yy][Ee][Ss])
	echo -n ' linux'
	if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then
		kldload linux > /dev/null 2>&1
	fi
	if [ -x /compat/linux/sbin/ldconfig ]; then
		/compat/linux/sbin/ldconfig
	fi
	;;
esac

# Start the SysVR4 binary emulation if requested.
#
case ${svr4_enable} in
[Yy][Ee][Ss])
	echo -n ' svr4';	kldload svr4 > /dev/null 2>&1
	;;
esac

echo '.'

# Do traditional (but rather obsolete) rc.local file if it exists.  If you
# use this file and want to make it programmatic, source /etc/defaults/rc.conf
# in /etc/rc.local and add your custom variables to /etc/rc.conf, as
# shown below.  Please do not put local extensions into /etc/rc itself.
# Use /etc/rc.local
#
# ---- rc.local ----
#	if [ -r /etc/defaults/rc.conf ]; then
#		. /etc/defaults/rc.conf
#		source_rc_confs
#	elif [ -r /etc/rc.conf ]; then
#		. /etc/rc.conf
#	fi
#
#	... additional startup conditionals ...
# ---- rc.local ----
#
if [ -r /etc/rc.local ]; then
	echo -n 'Starting local daemons:'
	sh /etc/rc.local
	echo '.'
fi

# For each valid dir in $local_startup, search for init scripts matching *.sh
#
case ${local_startup} in
[Nn][Oo] | '')
	;;
*)
	echo -n 'Local package initialization:'
	slist=""
	if [ -z "${script_name_sep}" ]; then
		script_name_sep=" "
	fi
	for dir in ${local_startup}; do
		if [ -d "${dir}" ]; then
			for script in ${dir}/*.sh; do
				slist="${slist}${script_name_sep}${script}"
			done
		fi
	done
	script_save_sep="$IFS"
	IFS="${script_name_sep}"
	for script in ${slist}; do
		if [ -x "${script}" ]; then
			(set -T
			trap 'exit 1' 2
			${script} start)
		elif [ -f "${script}" -o -L "${script}" ]; then
			echo -n " (skipping ${script##*/}, not executable)"
		fi
	done
	IFS="${script_save_sep}"
	echo '.'
	;;
esac

if [ -n "${network_pass3_done}" ]; then
	network_pass4
fi

# Late pass to set variables we missed the first time
#
if [ -r /etc/rc.sysctl ]; then
	sh /etc/rc.sysctl last
fi

# Raise kernel security level.  This should be done only after `fsck' has
# repaired local filesystems if you want the securelevel to be greater than 1.
#
case ${kern_securelevel_enable} in
[Yy][Ee][Ss])
	if [ "${kern_securelevel}" -ge 0 ]; then
		echo 'Raising kernel security level: '
		sysctl kern.securelevel=${kern_securelevel}
	fi
	;;
esac

# Start background fsck checks if necessary
case ${background_fsck} in
[Yy][Ee][Ss])
	bgfsck_msg='Starting background file system checks'
	if [ ${background_fsck_delay:=0} -gt 0 ]; then
		bgfsck_msg="${bgfsck_msg} in ${background_fsck_delay} seconds"
	fi
	echo "${bgfsck_msg}."

	(sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \
	    logger -p daemon.notice -t fsck &
	;;
esac

a75 1

a76 1

a77 1

@


1.327
log
@Set appropriate tag "fsck" to logger(1) for background fsck messages.

PR:		51174
Submitted by:	Alex Popa <razor@@ldc.ro>
@
text
@d86 9
@


1.326
log
@Redo the initial rc_ng check to avoid rc.conf pollution occuring too early,
initdiskless may retarget /etc and various rc.conf files.  The initial check
is now done in a subshell.
Reviewed by:	Mike Makonnen <mtm@@identd.net>
@
text
@d1004 1
a1004 1
	    logger -p daemon.notice &
@


1.325
log
@Do not unconditionally load the configuration files for the RCNG case.
Instead, load them as part of the rc.d system.  This allows us to prioritize
the initidiskless script so it runs before the configuration files are loaded
and allows us to get rid of the exit 2 hack in /etc/rc.  The exit 2 never
worked anyway since it did not unset the prior configuration, causing the
diskless code to not operate properly.

Do a major cleanup and revamping of the diskless code for RCNG.  This will
be backported to the non-RCNG scripts as well as -stable.

With suggestions from: Mike Makonnen <mtm@@identd.net>
MFC after:	7 days
@
text
@d53 4
a56 2
# If there is a global system configuration file, suck it in.
# XXX - The only purpose of duplicating it here is to catch rc_ng="YES"
d58 28
a85 5
if [ -r /etc/defaults/rc.conf ]; then
	. /etc/defaults/rc.conf
	source_rc_confs
elif [ -r /etc/rc.conf ]; then
	. /etc/rc.conf
a87 5
# Diskless setups have to depend on a different mechanism since
# their config files haven't been retargeted yet.
#
[ -e /.rcng_yes ] && rc_ng="YES"

d89 1
a89 1
[Yy][Ee][Ss])
@


1.324
log
@Delay an optional amount of time after booting before starting a
background fsck. The delay defaults to sixty seconds to allow
large applications such as the X server to start before disk I/O
bandwidth is monopolized by fsck.

Submitted by:	Brooks Davis <brooks@@one-eyed-alien.net>
Sponsored by:   DARPA & NAI Labs.
@
text
@d72 3
a74 2
	# Load system configuration files. The 'XXX' is there because
	# the function requires an argument that we don't need to use.
a75 2
	load_rc_config 'XXX'

a89 7
		# Local FreeBSD hack to reload the rc.conf on
		# a return status of 2
		if [ $? -eq 2 ]; then
			unset _rc_conf_loaded
			load_rc_config 'XXX'
			echo "Reloading rc.conf."
		fi
@


1.323
log
@Update rc scripts to load mac_lomac instead of lomac.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
@
text
@d985 8
a992 2
	echo 'Starting background filesystem checks'
	nice -4 fsck -B -p 2>&1 | logger -p daemon.notice &
@


1.322
log
@Aesthetics: Most (all?) other messages output at boot time have
trailing periods, so why shouldn't this one?
@
text
@d600 1
a600 1
	kldload lomac >/dev/null 2>&1
@


1.321
log
@Fix all whitespace style bugs where spaces have been used
where tabs should have been. Cut & paste disease?

Spotted by:	vi(1) tabstop=4
MFC after:	2 weeks
@
text
@d96 1
a96 1
			echo "Reloading rc.conf"
@


1.320
log
@In a diskless setup, rc.d/initdiskless may overwrite parts of /etc on
a per-machine or per-cluster (with different ways of expressing what's
part of a cluster) basis.  In order for this to be effective, rc.conf
has to be reread after initdiskless is finished.  Implement this by
adding a hook to etc/rc which rereads rc.conf by request.  This can
also be implemented by renaming initdiskless to initdiskless.sh and
sourcing rc.conf there manually, but it was decided that, that would
be uglier than a hook in etc/rc.

Developed in concert with:	gordon
@
text
@d57 2
a58 2
        . /etc/defaults/rc.conf
        source_rc_confs
d60 1
a60 1
        . /etc/rc.conf
d78 1
a78 1
        	autoboot=yes
d80 1
a80 1
        	rc_fast=yes        # run_rc_command(): do fast booting
d90 1
a90 1
        	run_rc_script ${_rc_elem} ${_boot}
d161 1
a161 1
		    ;;
d163 4
a166 4
		    eval ${dep_var}="YES"
		    echo "DEPENDENCY NOTE: ${dep} will be enabled" \
			 "to support ${svc}"
		    ;;
d548 4
a551 4
	       echo -n "Mounting ${fsdecr} filesystems:"
	       mount -a -t ${fstype}
	       echo '.'
	       ;;
@


1.319
log
@Initiate deorbit burn for the i386-only a.out related support.  Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
@
text
@d91 7
@


1.318
log
@Quiet warnings about non-existent scripts. My own fault for not testing my
own patches as well as I should.
@
text
@d701 8
a708 12
	case `/usr/bin/objformat` in
	elf)
		_LDC=/usr/lib
		for i in ${ldconfig_paths}; do
			if [ -d "${i}" ]; then
				_LDC="${_LDC} ${i}"
			fi
		done
		echo 'ELF ldconfig path:' ${_LDC}
		${ldconfig} -elf ${_LDC}
		;;
	esac
@


1.317
log
@Remove an accidental double chkdepend that snuck in during the last commit.

Submitted by:	Mike Makonnen <makonnen@@pacbell.net>
@
text
@d87 1
a87 1
	files=`rcorder -k ${os} -s nostart /etc/rc.d/*`
@


1.316
log
@Don't export variables from /etc/rc when doing rc_ng because the scripts
are sourced in a subshell.

Submitted by:	Mike Makonnen <makonnen@@pacbell.net>
@
text
@a167 1
chkdepend NFS nfs_server_enable rpcbind rpcbind_enable
@


1.315
log
@Clean up some variables that should have been done before:
xntpd_* -> ntpd_*
portmap_* -> rpcbind_*

Also change single_mountd_enable to mountd_enable.

We also include shims for all the old variable names.

Submitted by:	Mike Makonnen <makonnen@@pacbell.net>
@
text
@a80 2
		export autoboot
		export rc_fast
@


1.314
log
@Add the final bits that allow the use of rc.d. Note that you can toggle
between rc.d and the classic boot scripts based on the rcng variable in
your rc.conf. Defaults to classic boot scripts.

Submitted by:	Mike Makonnen
@
text
@d125 11
d167 1
a167 1
chkdepend amd amd_enable        portmap portmap_enable
d169 4
a172 3
chkdepend NFS nfs_server_enable portmap portmap_enable
chkdepend NIS nis_server_enable portmap portmap_enable
chkdepend NIS nis_client_enable portmap portmap_enable
@


1.313
log
@Consistancy, file system > filesystem
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.312 2002/05/08 14:47:44 nectar Exp $
a48 2
bootmode=$1

d52 53
@


1.312
log
@It is dangerous to use globbing like so in startup scripts:

  rm -f /tmp/.X11-unix/*

If /tmp/.X11-unix didn't already exist, a user could symlink it to a directory
with files that he wants to wipe out, and wait for next reboot.

Reported by:	lumpy <lumpy@@the.whole.net>
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.311 2002/04/26 22:32:14 wes Exp $
d233 1
a233 1
			echo 'Automatic file system check failed . . . help!'
d239 1
a239 1
			echo 'Automatic file system check failed . . . help!'
d460 1
a460 1
		echo -n 'Mounting NFS file systems:'
d481 1
a481 1
	       echo -n "Mounting ${fsdecr} file systems:"
d908 1
a908 1
# repaired local file systems if you want the securelevel to be greater than 1.
@


1.311
log
@Rename the file used to specify the nextboot to make it clear that this
is a loader configuration file and can be used for more than just a
kernel name.

Submitted by:	Gordon Tetlow <gordont@@gnf.org>
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.310 2002/04/26 07:31:03 wes Exp $
d523 3
a525 1
rm -f /tmp/.X*-lock /tmp/.X11-unix/*
@


1.310
log
@Add a -k option to reboot to specify the kernel to boot next time
around.  If the kernel boots successfully, the record of this kernel
is erased, it is intended to be a one-shot option for testing
kernels.

This could be improved by having the loader remove the record of
the next kernel to boot, it is currently removed in /etc/rc immediately
after disks are mounted r/w.

I'd like to MFC this before the 4.6 freeze unless there is violent
objection.

Reviewed by:	Several on IRC
MFC after:	4 days
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.309 2002/04/23 00:05:48 obrien Exp $
d319 1
a319 1
rm -f /boot/nextkernel
@


1.309
log
@Do not use 'ps -e' for entropy gathering.  It uses /proc/*/mem to rummage
around *user* memory to extract the environment variable strings.  This
is problematic for us.

Submitted by:	peter
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.308 2002/04/05 02:30:40 gshapiro Exp $
d316 4
@


1.308
log
@Quoting Peter Wemm, "At great personal risk, touch the sendmail startup
again."

As an alternative to sendmail_enable=NONE, solve the boot time problem
for non-sendmail users completely by moving all of the sendmail startup
code from /etc/rc to /etc/rc.sendmail.  The source for that script will
be kept in src/etc/sendmail/rc.sendmail so make.conf's NO_SENDMAIL will
prevent it from being installed.  A new rc.conf variable,
mta_start_script specifies the script to run to start the user's
preferred MTA.  For backward compatibility, it will default to
/etc/rc.sendmail.  The specified script is called out of /etc/rc after
checking to make sure it exists.  A new rc.sendmail.8 man page has also
been added which now houses the sendmail_* variable descriptions
formerly in rc.conf.5.

Use /etc/rc.sendmail in /etc/mail/Makefile to reduce code duplication.

Reviewed by:	-current, -stable, obrien, peter, ru
MFC after:	1 week
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.307 2002/03/28 03:29:18 gshapiro Exp $
d178 1
a178 1
( ps -efauxww; sysctl -a; date; df -ib; dmesg; ps -efauxww; ) \
@


1.307
log
@Provide a way for users to completely prevent sendmail from trying to start
at boot time.

Instead of rc.conf's sendmail_enable only accepting YES or NO, it can now
also accept NONE.  If set to NONE, none of the other sendmail related
startup items will be done.

Remove an extra queue running daemon might be started that wasn't necessary
(it didn't hurt anything but it wasn't needed).

The new logic is:

# MTA
if ${sendmail_enable} == NONE
        # Do nothing
else if ${sendmail_enable} == YES
        start sendmail with ${sendmail_flags}
else if ${sendmail_submit_enable} == YES
        start sendmail with ${sendmail_submit_flags}
else if ${sendmail_outbound_enable} == YES
        start sendmail with ${sendmail_outbound_flags}
endif
# MSP Queue Runner
if ${sendmail_enable} != NONE &&
   [ -r /etc/mail/submit.cf] && ${sendmail_msp_queue_enable} == YES
        start sendmail with ${sendmail_msp_queue_flags}
endif

Discussed with: Thomas Quinot <Thomas.Quinot@@Cuivre.FR.EU.ORG>,
		Christopher Schulte <schulte+freebsd@@nospam.schulte.org>
MFC after:	1 week
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.306 2002/03/26 02:38:08 obrien Exp $
d705 4
a708 38
# Note: Please keep the sendmail startup code here in sync with the code
#       in src/etc/mail/Makefile.
case ${sendmail_enable} in
[Nn][Oo][Nn][Ee])
	;;
[Yy][Ee][Ss])
	echo -n ' sendmail'
	/usr/sbin/sendmail ${sendmail_flags}
	;;
*)
	case ${sendmail_submit_enable} in
	[Yy][Ee][Ss])
		echo -n ' sendmail-submit'
		/usr/sbin/sendmail ${sendmail_submit_flags}
		;;
	*)
		case ${sendmail_outbound_enable} in
		[Yy][Ee][Ss])
			echo -n ' sendmail-outbound'
			/usr/sbin/sendmail ${sendmail_outbound_flags}
			;;
		esac
		;;
	esac
	;;
esac

case ${sendmail_enable} in
[Nn][Oo][Nn][Ee])
	;;
*)
	if [ -r /etc/mail/submit.cf ]; then
		case ${sendmail_msp_queue_enable} in
		[Yy][Ee][Ss])
			echo -n ' sendmail-clientmqueue'
			/usr/sbin/sendmail ${sendmail_msp_queue_flags}
			;;
		esac
@


1.306
log
@Don't start any sendmail process in the back ground.

Requested by:	gshapiro
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.305 2002/03/25 20:53:48 obrien Exp $
d705 2
d708 2
a714 6
	case ${sendmail_outbound_enable} in
	[Yy][Ee][Ss])
		echo -n ' sendmail-outbound'
		/usr/sbin/sendmail ${sendmail_outbound_flags}
		;;
	esac
d720 8
d732 14
a745 8
if [ -r /etc/mail/submit.cf ]; then
	case ${sendmail_msp_queue_enable} in
	[Yy][Ee][Ss])
		echo -n ' sendmail-clientmqueue'
		/usr/sbin/sendmail ${sendmail_msp_queue_flags}
		;;
	esac
fi
@


1.305
log
@Don't background the sendmail-clientmqueue process -- can give:
sm-queue[181]: NOQUEUE: SYSERR(root): fill_fd: before readcf: fd 1 not open: Bad file descriptor
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.304 2002/03/22 23:45:13 obrien Exp $
d708 1
a708 1
	/usr/sbin/sendmail ${sendmail_flags} &
d714 1
a714 1
		/usr/sbin/sendmail ${sendmail_outbound_flags} &
d720 1
a720 1
		/usr/sbin/sendmail ${sendmail_submit_flags} &
@


1.304
log
@Sendmail can be slow to startup.
So start it in the background to speed up booting.
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.303 2002/03/18 00:56:51 dougb Exp $
d730 1
a730 1
		/usr/sbin/sendmail ${sendmail_msp_queue_flags} &
@


1.303
log
@Make sure that rc.syctl gets its own version of positional parameters

Submitted by:	cjc
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.302 2002/03/17 20:14:11 dougb Exp $
d708 1
a708 1
	/usr/sbin/sendmail ${sendmail_flags}
d714 1
a714 1
		/usr/sbin/sendmail ${sendmail_outbound_flags}
d720 1
a720 1
		/usr/sbin/sendmail ${sendmail_submit_flags}
d730 1
a730 1
		/usr/sbin/sendmail ${sendmail_msp_queue_flags}
@


1.302
log
@Distinguish between first and last passes of rc.sysctl, and only set
mibs whose values are not already what is specified in sysctl.conf.
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.301 2002/03/17 08:38:03 dougb Exp $
d407 1
a407 1
	. /etc/rc.sysctl first
d920 1
a920 1
	. /etc/rc.sysctl last
@


1.301
log
@Add a late rc.sysctl pass to catch sysctl's for things that were
not loaded yet on the first pass.

PR:		conf/19629
Submitted by:	Stephen J. Roznowski <sjr@@home.com>
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.300 2002/03/16 20:01:25 cjc Exp $
d407 1
a407 2
	echo 'Warnings here may be due to modules that have not been loaded yet'
	. /etc/rc.sysctl
d920 1
a920 1
	. /etc/rc.sysctl
@


1.300
log
@Only put standard FreeBSD directories in the PATH. If the
administrator wishes to run commands outside of the PATH, he should
use a full pathname for the executable or set the PATH as appropriate
in any local startup scripts.

PR:		misc/35770
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.299 2002/03/12 21:47:30 rwatson Exp $
d404 1
a404 1
# Set sysctl variables as early as we can
d407 1
d916 6
@


1.299
log
@Allow LOMAC to be loaded as part of the boot scripts using "lomac_enable"
setting in rc.conf.

Extracted from the still clammy hands of:	green
Sponsored by:	DARPA, NAI Labs
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.298 2002/03/12 20:59:35 cjc Exp $
d52 1
a52 1
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
@


1.298
log
@Run dumpon(8) early so crashes during startup can be caught. In
addition, take out the checks on the $dumpdev. dumpon(8) behaves well
if given a non-existent filename. It gives a nice error message which
is better rather than the current silent failure.

Reviewed by:	des
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.297 2002/03/11 08:46:55 cjc Exp $
d523 7
@


1.297
log
@Don't protect savecore(8) from being run with a bad dumpdir
argument. Don't fail silently, but let savecore(8) make noise. It
won't behave badly, it doesn't need protection.

At the same time, allow the administrator to have dumpdev enabled
while dumpdir (savecore(8)) is disabled and document how to do it.

PR:		conf/35725
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.296 2002/02/17 22:19:14 gshapiro Exp $
d111 11
d554 1
a554 2
# Enable dumpdev so that savecore can see it.
# /var/crash should be a directory or a symbolic link
d557 1
a557 4
case ${dumpdev} in
[Nn][Oo] | '')
	;;
*)
d567 3
a569 6
	if [ -e "${dumpdev}" ]; then
		/sbin/dumpon -v ${dumpdev}
		if [ "$dumpdir" != 'NO' ]; then
			echo -n 'Checking for core dump: '
			/sbin/savecore ${savecore_flags} "${dumpdir}"
		fi
d571 1
a571 2
	;;
esac
@


1.296
log
@Add infrastructure for sendmail 8.12.  If users are not starting a daemon
at boot (sendmail_enable=NO), a localhost-only daemon may started
(sendmail_submit_enable) as it is needed to accept mail from command line
submissions.  If this isn't desired, see etc/mail/README for more hints.

Optionally (sendmail_msp_queue_enable) start a queue runner for the
submission queue in case a daemon isn't available to accept command line
submitted mail at submission time.

Note that the syslog labels for all of these sendmail processes have been
uniquified for easier log parsing.
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.295 2002/02/17 02:01:15 cjc Exp $
d555 3
d560 1
a560 1
	if [ -e "${dumpdev}" -a -d "${dumpdir}" ]; then
d562 4
a565 2
		echo -n 'Checking for core dump: '
		/sbin/savecore ${savecore_flags} "${dumpdir}"
@


1.295
log
@Remove check for sendmail.conf before even trying to start sendmail.

Checking for the existence of sendmail.cf is rather silly when someone
is using the mailwrapper(8) to run a mail daemon that is not actually
sendmail(8). It is also probably better to let sendmail(8) actually
try to start and error out if the administrator has
'sendmail_enable="YES"' but no sendmail.conf. At present, it would
fail silently.

Reviewed by:	gshapiro
MFC after:	2 days
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.294 2002/02/04 12:50:52 nyan Exp $
d698 1
a698 1
		echo -n ' sendmail'
d702 6
d710 9
@


1.294
log
@Use MACHINE_ARCH instead of MACHINE to check i386 arch.

MFC after:	3 days
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.293 2002/01/28 11:06:02 sheldonh Exp $
d690 7
a696 2
if [ -r /etc/mail/sendmail.cf ]; then
	case ${sendmail_enable} in
d699 1
a699 9
		/usr/sbin/sendmail ${sendmail_flags}
		;;
	*)
		case ${sendmail_outbound_enable} in
		[Yy][Ee][Ss])
			echo -n ' sendmail'
			/usr/sbin/sendmail ${sendmail_outbound_flags}
			;;
		esac
d702 2
a703 1
fi
@


1.293
log
@(forced commit)

The previous change is subject to:

MFC after:	1 month
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.292 2002/01/28 11:05:01 sheldonh Exp $
d634 1
a634 1
	case `sysctl -n hw.machine` in
d781 1
a781 1
arch=`uname -m`
@


1.292
log
@Register amd's dependency on NFS.

This change was submitted to the freebsd-audit mailing list for review
but received no feedback.  Hindsight-enabled reviews are welcome.

PR:		conf/31358
Submitted:	Thomas Quinot <thomas@@cuivre.fr.eu.org>
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.291 2001/12/29 19:42:54 sheldonh Exp $
@


1.291
log
@Don't require operators to override the list of network filesystem
types (networkfs_types) with a version that includes the original
list.

This increases the scope for user error and also means that systems with
networkfs_types set in /etc/rc.conf will not benefit from changes to the
list in /etc/defaults/rc.conf on upgrade.

Instead, store the default list in /etc/rc itself and allow the operator
to append to that list by specifying her own list in networkfs_types.

Rename networkfs_types to extra_netfs_types accordingly, as the new name
better describes the purpose of the variable.  Default the value to
'NO'.
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.290 2001/12/27 13:41:26 sheldonh Exp $
d106 1
@


1.290
log
@Re-introduce the fix that delays mounting of network filesystems until
the network is initialized.  This was first implemented in rev 1.268
of src/etc/rc, but was backed out at wollman's request.

The objection was that the right place for the fix is in mount(8).
Having looked at that problem, I find it hard to believe that
the hoops one would have to jump through can be justified by the
desire for purity alone.

Note that there are reported issues surrounding nfsclient kernel
support and mount_nfs(8), which currently make NFS an ugly exception
to the general case.

With this change, systems with non-NFS network filesystems configured
for mounting on startup in /etc/fstab are no longer guaranteed to
fail on startup.
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.289 2001/12/19 16:10:25 brian Exp $
d270 11
a281 3
if [ -z "${networkfs_types}" ]; then
	networkfs_types='nfs:NFS smbfs:SMB portalfs:PORTAL'
fi
@


1.289
log
@Don't assume that /var/run and /var/spool/lock are on the same
partition.

Submitted by:	ru
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.288 2001/12/12 10:12:20 roam Exp $
d271 10
a280 1
mount -a -t nonfs
d419 5
d446 17
@


1.288
log
@Set the script_name_sep variable to a safe value if it is not
already set (e.g. a failed/skipped mergemaster run during an upgrade).
Without this, if script_name_sep was not set in the rc.conf files,
local scripts will not be executed on startup or shutdown.

PR:		misc/32687
Submitted by:	Nicholas Paufler <echofox@@discordia.ca> (the problem)
		Sheldon Hearn (the idea behind the fix)
Reviewed by:	sheldonh
MFC after:	1 week
@
text
@d28 1
a28 1
# $FreeBSD$
d341 2
a342 3
	if [ ! -f /var/run/clean_var ]; then
		purgedir /var/run /var/spool/lock
		rm -rf /var/spool/uucp/.Temp/*
d349 5
d356 5
a360 6
if [ -d /var/run -a -d /var/spool/lock -a -d /var/spool/uucp/.Temp ]; then
	# network_pass1() *may* end up writing stuff to /var - we don't want to
	# remove it immediately afterwards - *nor* to we want to fail to clean
	# an nfs-mounted /var.
	clean_var
fi
d444 1
a444 1
rm /var/run/clean_var
@


1.287
log
@s/sysctl -w/sysctl/
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.286 2001/10/19 06:50:52 dougb Exp $
d816 3
@


1.286
log
@Handle the lack of nfs server or client support in the kernel by
kldload'ing the appropriate modules before enabling the service.
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.285 2001/10/10 04:25:44 dougb Exp $
d120 1
a120 1
		/sbin/sysctl -w kern.random.sys.harvest.interrupt=1 >/dev/null
d131 1
a131 1
		/sbin/sysctl -w kern.random.sys.harvest.ethernet=1 >/dev/null
d142 1
a142 1
	/sbin/sysctl -w kern.random.sys.harvest.point_to_point=1 >/dev/null
d850 1
a850 1
		sysctl -w kern.securelevel=${kern_securelevel}
@


1.285
log
@Follow existing style a little better
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.284 2001/10/09 18:39:59 des Exp $
d409 18
a426 3
	echo -n 'Mounting NFS file systems:'
	mount -a -t nfs
	echo '.'
@


1.284
log
@Add a dumpdir variable that determines where savecore stores crash dumps.
I've had this on my development box for ages...
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.283 2001/10/02 12:00:39 ru Exp $
d493 6
a498 3
	if [ -z "${dumpdir}" ]; then
		dumpdir="/var/crash"
	fi
@


1.283
log
@Sigh, fix the unfixed typo: s/-l/-L/.
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.282 2001/10/02 11:50:14 knu Exp $
d493 4
a496 1
	if [ -e "${dumpdev}" -a -d /var/crash ]; then
d499 1
a499 1
		/sbin/savecore ${savecore_flags} /var/crash
@


1.282
log
@Fix a typo: s/-or/-o/.
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.281 2001/10/01 22:52:32 obrien Exp $
d809 1
a809 1
		elif [ -f "${script}" -o -l "${script}" ]; then
@


1.281
log
@Add ()'s around the warning message when skipping a startup script.
Also don't give the whole path, just the script name.

Submitted by:	des
Requested by:	jhb
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.280 2001/10/01 21:30:27 obrien Exp $
d809 1
a809 1
		elif [ -f "${script}" -or -l "${script}" ]; then
@


1.280
log
@Tweak the Skipping ${script} logic to also handle symlinks.
Also echo with "-n".
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.279 2001/09/30 22:07:19 obrien Exp $
d810 1
a810 1
			echo -n " Skipping ${script}, not executable"
@


1.279
log
@Fix the problem that the startup directory is printed out if it
is empty.

Submitted by:	Udo Schweigert <udo.schweigert@@siemens.com>
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.278 2001/09/26 06:17:25 phk Exp $
d809 2
a810 2
		elif [ -f "${script}" ]; then
			echo "Skipping ${script}, not executable"
@


1.278
log
@Give people a chance to do things before fsck is run.

MFC after:	2 weeks
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.277 2001/09/26 06:01:40 obrien Exp $
d809 1
a809 1
		else
@


1.277
log
@Run rc.devfs a little bit earlier.
Many people like to use generic devices in rc.syscons, etc..
So rc.devfs needs to run before those rc files.

Requested by:	Jos Backus <josb@@cncdsl.com>
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.276 2001/09/25 01:55:21 obrien Exp $
d183 6
@


1.276
log
@Let people know when a startup script is skipped because it is not
executable.

Suggested by:	gad
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.275 2001/09/24 18:17:11 obrien Exp $
d703 6
a719 6
fi

# Run rc.devfs if readable to customize devfs
#
if [ -r /etc/rc.devfs ]; then
	sh /etc/rc.devfs
@


1.275
log
@Back out rev 1.274.  The previous behavior was documented in rc.8 and
the original commit of local_startup depended on the scripts being
executable; so there is too much precedence to change it now.  About all
anyone could agree on is that rev 1.274 broke POLA and before rev 1.274
also broke POLA.
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.274 2001/09/24 03:03:51 obrien Exp $
d803 2
@


1.274
log
@+ explicitly use the shell to run ${local_startup} so one does not have to
  ensure the executable bit is set on the scripts.
+ Fix VCS ID's
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.272 2001/07/17 14:33:50 roam Exp $
d802 1
a802 1
			sh ${script} start)
@


1.273
log
@Remove more vestages of diskcheckd, which is now in ports/sysutils.
@
text
@d27 1
a28 1
#	From: @@(#)rc	5.27 (Berkeley) 6/5/91
d802 1
a802 1
			${script} start)
@


1.272
log
@Add a script_name_sep rc.conf knob to specify the IFS character
for separating the startup scripts' list into individual filenames.

Run the shutdown scripts in reverse alphabetical order, so dependent
services are stopped before the services they depend upon.

Reviewed by:	-arch, -audit
MFC after:	3 weeks
@
text
@d27 1
a27 1
# $FreeBSD$
a465 8
	;;
esac

# Start disk checking daemon if required.
#
case ${diskcheckd_enable} in
[Yy][Ee][Ss])
	echo -n ' diskcheckd'; diskcheckd ${diskcheckd_flags}
@


1.271
log
@Reduce chattiness of entropy file mechanism with extreme prejudice.

Reviewed by:	USENIX Cabal (peter, jhb, wpaul, et al)
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.270 2001/06/28 03:32:09 dd Exp $
d796 1
d800 1
a800 5
				if [ -x "${script}" ]; then
					(set -T
					 trap 'exit 1' 2
					 ${script} start)
				fi
d804 10
@


1.270
log
@Introduce syslogd_program and inetd_program variables in case somebody
wants to replace one of those programs.

PR:		13609
Submitted by:	Goran Lowkrantz <goran.lowkrantz@@infologigruppen.se>
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.269 2001/06/10 12:09:11 sheldonh Exp $
d76 1
a76 1
		echo "Using ${1} as an entropy file"
@


1.269
log
@Back out rev 1.268.

Requested by:	wollman, rwatson
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.268 2001/06/09 09:47:05 sheldonh Exp $
d464 2
a465 1
	echo -n ' syslogd';	syslogd ${syslogd_flags}
d595 1
a595 1
	echo -n ' inetd';	inetd ${inetd_flags}
@


1.268
log
@Fix /etc/rc so that all remote filesystems, not just NFS, are mounted
after the network is configured.

Future remote filesystem types should be added to remote_fstypes, which
is a whitespace-delimited list of type:description pairs.

The specific problem this fixes right now is that smbfs mounts described
in /etc/ftsab were failing.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.267 2001/06/03 20:15:10 phk Exp $
d264 2
a265 9
# Mount everything except remote filesystems.
remotefs_types='nfs:NFS smbfs:SMB'
mount_excludes='no'
for i in ${remotefs_types}; do
	fstype=${i%:*}
	mount_excludes="${mount_excludes}${fstype},"
done
mount_excludes=${mount_excludes%,}
mount -a -t ${mount_excludes}
d400 8
a407 12
# Mount remote filesystems if present in /etc/fstab
for i in ${remotefs_types}; do
	fstype=${i%:*}
	fsdecr=${i#*:}
	case "`mount -d -a -t ${fstype}`" in
	*mount_${fstype}*)
		echo -n "Mounting ${fsdecr} file systems:"
		mount -a -t ${fstype}
		echo '.'
		;;
	esac
done
@


1.267
log
@Add diskcheckd to /etc/rc with a knob in rc.conf.

Make the default setting YES for now to get some experience with it.

Note: If people starts seeing disk errors because of this then it
should not be backed.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.266 2001/05/27 22:50:22 yar Exp $
d264 9
a272 2
# Mount everything except nfs filesystems.
mount -a -t nonfs
d407 12
a418 8
# Mount NFS filesystems if present in /etc/fstab
case "`mount -d -a -t nfs 2> /dev/null`" in
*mount_nfs*)
	echo -n 'Mounting NFS file systems:'
	mount -a -t nfs
	echo '.'
	;;
esac
@


1.266
log
@Don't confuse the admin with spurious error messages
about non-existent mount directories (which would come
into existence after the real mount has occured) when just
testing for if there are any NFS filesystems in /etc/fstab.

PR:		bin/26597
Submitted by:	Dmitry Morozovsky <marck@@rinet.ru>
MFC after:	3 days
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.265 2001/05/22 00:05:45 dd Exp $
d465 8
@


1.265
log
@Introduce a background_fsck rc.conf option which allows the user to
enable or disable background fsck'ing all in one shot.  Default is
currently 'YES'.

Reviewed by:	jkh
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.264 2001/05/13 20:43:30 peter Exp $
d401 1
a401 1
case "`mount -d -a -t nfs`" in
@


1.264
log
@Back out rev 1.260.  The 'streams' module is a registered dependency of
the 'svr4' module already.  This was a 4.x-only problem and should not
have been MFS'ed.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.263 2001/05/11 07:40:39 mckusick Exp $
d187 8
a194 3
#	To restore old fsck behavior use:
#	fsck -p
	fsck -F -p
d818 7
a824 3
# Start background fsck checks
echo 'Starting background filesystem checks'
nice -4 fsck -B -p 2>&1 | logger -p daemon.notice &
@


1.263
log
@Update the fsck command in /etc/rc to use the new background
fsck checking. Applying these changes (typically via mergemaster)
will cause your system to start running background checks on all
your soft update enabled filesystems (provided that you have
a kernel with the required functionality, e.g., one built since
the end of April). Please report any and all problems to
mckusick@@mckusick.com (not mckusick@@freebsd.org which I read
infrequently). See the comment above the fsck command in /etc/rc
for instructions on how to disable background checking should it
cause you too much trouble.

Several FAQs:

1) Can I reboot before the background checks are done?

Ans) Yes, when the system restarts the checks will pick up
     where they left off.

2) Can a crash during checking corrupt my filesystem?

Ans) No, recovered resources are returned to the system using soft
     updates which ensure that the freeing is done in a safe order.

3) How will I know if any background checks are being done?

Ans) Filesystems that are to be checked in background will be listed
     as `DEFER FOR BACKGROUND CHECKING' at the usual fsck check time
     during system startup.

4) What happens to the output of the background checks?

Ans) It is sent to syslog `daemon' facility log level `notice'.

5) When will this feature be available in the 4.X kernel?

Ans) Never. It is much too radical and extensive a change to be
     MFC'ed. Besides, it needs many months of experience and
     tuning before it is ready for widespread use.

6) What happens if a background fsck fails (i.e., fsck finds
   errors that would normally require a manual fsck)?

Ans) The filesystem will be marked as needing a manual fsck.
     At the next system reboot, the check will be done in
     foreground and the usual actions taken (usually a failure
     to go multi-user until fsck has been run by hand on the
     affected filesystem).
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.262 2001/05/10 09:25:10 brian Exp $
d746 1
a746 3
	echo -n ' svr4';
	kldload streams > /dev/null 2>&1
	kldload svr4 > /dev/null 2>&1
@


1.262
log
@Delete everything that's not a directory in /var/run and /var/spool/lock
at boot time.

MFC after: 3 weeks
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.261 2001/04/15 13:44:05 phk Exp $
d187 3
a189 1
	fsck -p
d814 4
@


1.261
log
@In the /etc/rc startup script a soft link is created from /var/run/log to
/dev/log like this: if [ ! -h /dev/log ];
The man page for test(1) says that the -h switch is depracated and that
users should NOT rely on it being available. It suggest the -L switch instead.
They both do the same thing: check for the existence of the symbolic link.

PR:		26596
Submitted by:	mikem <mike_makonnen@@yahoo.com>
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.260 2001/04/14 12:26:03 jkh Exp $
d315 2
a316 1
				[ -d "$file" -a ! -L "$file" ] &&
d318 3
a320 1
				[ -f "$file" -o -S "$file" ] && rm -f -- "$file"
@


1.260
log
@MFS: deal with svr4 module's dependency on streams module
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.259 2001/04/10 16:15:01 ru Exp $
d448 1
a448 1
	if [ ! -h /dev/log ]; then
@


1.259
log
@vnconfig(8) -> mdconfig(8).

Reviewed by:	phk
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.258 2001/03/28 10:13:26 brian Exp $
d741 3
a743 1
	echo -n ' svr4';	kldload svr4 > /dev/null 2>&1
@


1.258
log
@Remove sockets found in /var/run or /var/spool/lock at boot time
(as well as files).
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.257 2001/03/13 05:53:16 peter Exp $
d349 1
a349 1
	if [ -w "${swapfile}" -a -c /dev/vn0b ]; then
d351 1
a351 1
		vnconfig /dev/vn0b ${swapfile} && swapon /dev/vn0b
@


1.257
log
@At great personal risk, touch the sendmail startup again.  This adds easy
seperate knobs for inbound (accepting SMTP connections) and outbound (just
occasionally dequeueing) sendmail daemon startup.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.256 2001/03/12 05:18:00 dougb Exp $
d317 1
a317 1
				[ -f "$file" ] && rm -f -- "$file"
@


1.256
log
@Add flags option for savecore.

Submitted by:	David A. Panariti <davep@@who.net>
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.255 2001/03/10 13:45:28 markm Exp $
a593 8
case ${sendmail_enable} in
[Yy][Ee][Ss])
	if [ -r /etc/mail/sendmail.cf ]; then
		echo -n ' sendmail';	/usr/sbin/sendmail ${sendmail_flags}
	fi
	;;
esac

d608 17
@


1.255
log
@The /dev/random harvesting sysctls have had a name change.
Reflect this.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.254 2001/03/10 05:33:37 dougb Exp $
d477 1
a477 1
		dumpon -v ${dumpdev}
d479 1
a479 1
		savecore /var/crash
@


1.254
log
@Avoid complicated tests of whether devices are present or not, and
enable all harvesting options by default since having them on for
devices not present doesn't hurt anything. Leave them on by default
since for the most part they are not producing noticable slowdown,
and are about to get a lot more efficient.

Re-order part of the cheesy entropy process in preparation for
its complete removal.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.253 2001/03/01 13:19:48 dougb Exp $
d120 1
a120 1
		/sbin/sysctl -w kern.random.sys.harvest_interrupt=1 >/dev/null
d131 1
a131 1
		/sbin/sysctl -w kern.random.sys.harvest_ethernet=1 >/dev/null
d142 1
a142 1
	/sbin/sysctl -w kern.random.sys.harvest_point_to_point=1 >/dev/null
@


1.253
log
@Add code to turn on the entropy harvesting sysctl's as early as possible
during the boot process. We're turning it on by default, based on the
actual presence of a configured ethernet card, and/or ppp/tun devices.
Of course, it's easy to disable in rc.conf.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.252 2001/02/05 04:54:41 dougb Exp $
a125 10
# Steal some code from rc.network to help determine what to enable.
case ${network_interfaces} in
[Aa][Uu][Tt][Oo])
	h_network_interfaces="`ifconfig -l`"
	;;
*)
	h_network_interfaces="${network_interfaces}"
	;;
esac

d130 1
a130 14
	do_ether_harvest=''

	for h_ifn in ${h_network_interfaces}; do
		eval h_ifconfig_args=\$ifconfig_${h_ifn}
		case ${h_ifconfig_args} in
		'')
			;;
		*)
			do_ether_harvest=1
			;;
		esac
	done

	if [ -w /dev/random -a "${do_ether_harvest}" ]; then
d141 1
a141 16
	do_p_to_p_harvest=''

	# Other than user ppp, tun* will already exist
	case "${h_network_interfaces}" in
	*tun0*)
		do_p_to_p_harvest=1
		;;
	esac

	case ${ppp_enable} in
	[Yy][Ee][Ss])
		do_p_to_p_harvest=1
		;;
	esac

	if [ -w /dev/random -a "${do_p_to_p_harvest}" ]; then
a151 8
# XXX temporary until we can get the entropy
# harvesting rate up
# Entropy below is not great,
# but better than nothing.
( ps -efauxww; sysctl -a; date; df -ib; dmesg; ps -efauxww; ) \
    | dd of=/dev/random bs=8k 2>/dev/null
cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null

d161 8
@


1.252
log
@Introduce the option of running fsck -y if the initial preen fails.
Defaults to off.

Obtained from:	Yahoo!
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.251 2001/01/30 10:07:03 brian Exp $
d109 78
@


1.251
log
@Run purgedir (a local function) on /var/run instead of rm /var/run/*

PR:		24612
Submitted by:	David Drum <david@@mu.org>
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.250 2001/01/21 20:57:13 dougb Exp $
d160 18
a177 2
		echo 'Automatic file system check failed... help!'
		exit 1
@


1.250
log
@Add the options of which cron program to run, and specifying flags
to it.

PR:		conf/24358
Submitted by:	Gerhard Sittig <Gerhard.Sittig@@gmx.net>
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.249 2001/01/16 20:05:02 des Exp $
d270 1
a270 2
		rm -rf /var/run/*
		purgedir /var/spool/lock
@


1.249
log
@Add a sysvipc_enable variable that causes the SysV IPC modules to be loaded.

Reviewed by:	dougb
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.248 2001/01/14 07:18:20 dougb Exp $
d529 1
a529 1
	echo -n ' cron';	cron
@


1.248
log
@Move the process of storing entropy from /dev/random and reseeding with
it at boot time closer to the way we want it to be in the final version.

* Move the default directory to /var/db/entropy
* Run the entropy saving cron job every 11 minutes. This seems
  to be a better default, although still bikeshed material.
* Feed /dev/random some cheesy "entropy" from various commands
  and files before the disks are mounted. This gives /dev/random
  a better chance of running without blocking early.
* Move the reseeding with previously stored entropy to the point
  immediately after the disks are mounted.
* Make the harvesting script a little safer in regards to the
  possibility of accidentally overwriting something other
  than a regular file.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.247 2001/01/11 13:00:41 dougb Exp $
d648 10
@


1.247
log
@Add a system to save entropy from /dev/random periodically so that
it can be used to reseed at boot time. This will greatly increase
the chances that there will be sufficient entropy available at
boot time to prevent long delays.

For /etc/rc, remove the vmstat and iostat runs from the attempt
to provide some cheesy randomness if the files fail, since
those programs are dynamically linked, and ldd seems to want
some randomness to do its magic.

Guidance and parameters for this project were provided by
Mark Murray, based on the requirements of the Yarrow
algorithm. Some helpful suggestions for implementation
(including the tip about iostat and vmstat) were provided
by Sheldon Hearn. All blame for problems or mistakes is
mine of course.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.246 2001/01/11 02:11:14 bsd Exp $
d74 7
d110 1
a110 1
# First pass at entropy recovery so the rebooting /dev/random can reseed.
d112 7
a118 7
feed_dev_random() {
	if [ -f "${1}" -a -r "${1}" -a -s "${1}" ]; then
		echo "Using ${1} as an entropy file"
		cat ${1} > /dev/random 2> /dev/random &&
		entropy_reseeded=yes
	fi
}
a129 15
case ${entropy_dir} in
[Nn][Oo])
	;;
*)
	entropy_dir=${entropy_dir:-/.entropy}
	if [ -d "${entropy_dir}" ]; then
		if [ -w /dev/random ]; then
			for seedfile in ${entropy_dir}/*; do
				feed_dev_random "${seedfile}"
			done
		fi
	fi
	;;
esac

d219 3
a221 4
# Second attempt at reseeding, if needed.
#
case ${entropy_reseeded} in
yes)
d224 2
a225 4
	case ${entropy_file} in
	[Nn][Oo] | '')
		;;
	*)
d227 3
a229 19
			if [ -f "${entropy_file}" -a -r "${entropy_file}" -a \
			    -s "${entropy_file}" ]; then
				feed_dev_random "${entropy_file}"
			elif [ "${entropy_file}" != /var/db/entropy -a \
			    -f /var/db/entropy -a -r /var/db/entropy -a \
			    -s /var/db/entropy ]; then
				feed_dev_random /var/db/entropy 
			else
    echo "Can't use ${entropy_file} as an entropy file, trying other sources"
				# XXX temporary until we can get the entropy
				# harvesting rate up
				# Entropy below is not great,
				# but better than nothing.
				(ps -gauxwww; sysctl -a;
				    dmesg) | /bin/dd of=/dev/random bs=8k 2>/dev/null
				( for i in /etc /var/run ; do
					cd $i ; ls -al ; cat *
				done ) | /bin/dd of=/dev/random bs=8k 2>/dev/null
			fi
d231 1
a231 2
		;;
	esac
d235 9
a243 2
# Remove these to prevent problems on future reboots
rm -f "${entropy_file}" /var/db/entropy
@


1.246
log
@Add portmap as a dependency for NIS client and server.

Requested by:	gallatin
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.245 2001/01/09 22:28:17 jhb Exp $
d105 8
d118 15
a132 5
		if [ -f "${entropy_file}" -a -r "${entropy_file}" -a \
		    -s "${entropy_file}" ]; then
			echo "Using ${entropy_file} as an entropy file"
			cat ${entropy_file} > /dev/random 2> /dev/random
			entropy_reseeded=yes
d240 1
a240 2
				echo "Using ${entropy_file} as an entropy file"
				cat ${entropy_file} > /dev/random 2> /dev/random
d244 1
a244 2
				echo 'Using /var/db/entropy as an entropy file'
				cat /var/db/entropy > /dev/random 2> /dev/random
d251 1
a251 1
				(ps -gauxwww; iostat; vmstat; sysctl -a;
@


1.245
log
@Move the syscons configuration to a machine independent rc.syscons.  The
syscons sh code was identical on both platforms except for whitespace
differences.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.244 2000/12/17 08:24:49 dougb Exp $
d100 2
@


1.244
log
@In addition to:
Apply a more consistent style to the echo statements in /etc/ scripts.
* Put quotes around each line
* Single quotes for lines with no variable interpolation
* Double quotes if there is
* Capitalize each word that begins a line
* Make echo -n 'Doing foo:' ... echo '.' more of a standard

Also:
* Use rm -f on /var/run/dev.db so if it's not there (devfs) it doesn't error
* Shorten the ldconfig messages so that the default fits on one line
* Test whether /var/msgs/bounds is a link before overwriting it
* Generally futz around with whitespace
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.243 2000/12/13 19:17:54 bsd Exp $
d636 6
@


1.243
log
@Flesh out a simple framework for dependency checking rc.conf enabled
services.  Simple YES/NO style *_enable services are supported.

Reviewed by:	obrien
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.242 2000/12/13 00:43:10 bsd Exp $
d134 1
a134 1
	echo Automatic boot in progress...
d144 1
a144 1
		echo "reboot failed... help!"
d148 1
a148 1
		echo "Automatic file system check failed... help!"
d152 1
a152 1
		echo "Reboot interrupted"
d160 1
a160 1
		echo "Unknown error in reboot"
d166 1
a166 1
	echo Skipping disk checks ...
d181 1
a181 1
		echo "Mounting root filesystem rw failed, startup aborted"
d196 1
a196 1
	echo "Mounting /etc/fstab filesystems failed, startup aborted"
d225 1
a225 1
				echo "Using /var/db/entropy as an entropy file"
d298 1
a298 1
		echo "Adding ${swapfile} as additional swap."
d341 1
a341 1
	echo -n "Mounting NFS file systems"
d343 1
a343 1
	echo .
d369 1
a369 1
	echo clearing /tmp
d375 1
d387 1
a387 1
echo -n 'additional daemons:'
d411 1
a411 1
	rm /var/run/dev.db
d426 1
a426 1
		echo -n checking for core dump...
d442 1
a442 1
		echo -n 'checking quotas:'
d448 1
a448 1
	echo -n 'enabling quotas:'
d468 1
a468 1
		echo 'turning on accounting'
d495 1
a495 1
		echo 'setting ELF ldconfig path:' ${_LDC}
d511 1
a511 1
		echo 'setting a.out ldconfig path:' ${_LDC}
d519 1
a519 1
echo -n starting standard daemons:
d571 1
a571 1
	echo 'Recovering vi editor sessions'
d606 1
a609 1
# "Delete important files with symlink" security hole?
d611 1
a611 1
if [ -d /var/msgs -a ! -f /var/msgs/bounds ]; then
d644 1
a644 1
echo -n additional ABI support:
d668 1
a668 1
echo .
d688 1
a688 1
	echo -n 'starting local daemons:'
d711 1
a711 1
	echo .
d725 1
a725 1
		echo 'Raising kernel security level'
d731 2
d734 1
d736 1
@


1.242
log
@If portmap is started as a dependancy, echo a notice during boot.

Approved by:	obrien
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.241 2000/12/11 22:47:50 obrien Exp $
d74 10
a83 2
# Deal with dependancies.
	case ${amd_enable} in
d85 1
a85 1
		case ${portmap_enable} in
d87 1
a87 1
			;;
d89 4
a92 4
			portmap_enable="YES"
			echo "DEPENDENCY NOTE: portmap will be enabled" \
			     "to support amd"
			;;
d96 1
a96 15
	case ${nfs_server_enable} in
	[Yy][Ee][Ss])
		if [ -r /etc/exports ]; then
			case ${portmap_enable} in
			[Yy][Ee][Ss])
				;;
			*)
				portmap_enable="YES"
				echo "DEPENDENCY NOTE: portmap will be enabled" \
				     "to support NFS"
				;;
			esac
		fi
		;;
	esac
d98 2
@


1.241
log
@Set portmap_enable if Amd or running as an NFS server is enabled.
This bites too many systems upgrading from our change in defaults.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.240 2000/11/21 04:21:54 dougb Exp $
d77 9
a85 2
		
		portmap_enable="YES"
d91 9
a99 1
			portmap_enable="YES"
@


1.240
log
@Do a better job of preserving the value rc is called with
in the face of possible corruption by rc.diskless*.

PR:		misc/21904
Submitted by:	Anton Voronin, anton@@urc.ac.ru
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.239 2000/10/22 19:10:13 phk Exp $
d73 15
@


1.239
log
@On DEVFS machines, the device name database is no use.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.238 2000/10/20 17:41:46 jkh Exp $
d49 2
d106 1
a106 1
case $1 in
@


1.238
log
@Redirect the stderr of dd to /dev/null so the user doesn't see rather
weird dd output on bootup as /dev/random is being reseeded.  Also,
can't this happen in the background since /dev/random blocks?
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.237 2000/10/18 05:29:26 jwd Exp $
d379 1
a379 1
# Build devices database
d381 5
a385 1
dev_mkdb
@


1.237
log
@Use dd to better block the data being sent to /dev/random.
Note: I am not redirecting stdout so that the amount of
      data being transferred can be seen (22k and 576k currently).
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.236 2000/10/16 06:16:44 jwd Exp $
d206 1
a206 1
				    dmesg) | /bin/dd of=/dev/random bs=8k
d209 1
a209 1
				done ) | /bin/dd of=/dev/random bs=8k
@


1.236
log
@Style fix only.

init 6 vs. /sbin/reboot problem still exists (pr 14829)

Submitted by:	Doug Barton <DougB@@gorean.org>
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.235 2000/10/16 04:44:35 jwd Exp $
d206 1
a206 1
				    dmesg) > /dev/random 2> /dev/random
d209 1
a209 1
				done ) > /dev/random 2> /dev/random
@


1.235
log
@Having played with this commit request for a few hours, I've
convinced myself that it's better then what we have, but still
not perfect.

/etc/rc  : Attempt to seed /dev/random with multiple backoffs.

/etc/rc.shutdown : Attempt to write the entropy_file.

In debugging the above changes, I've run into some
inconsistancies... rc.shutdown is run via 'init 6', but
does not appear to be run via '/sbin/reboot'. Thus, this
set of changes improves life depending on the mechanism
used to shut the system down.

Submitted by:	Doug Barton <DougB@@gorean.org>
Approved by:	markm
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.234 2000/10/14 12:56:08 markm Exp $
d200 1
a200 1
				echo "Can't use ${entropy_file} as an entropy file, trying other sources"
d203 4
a206 2
				# Entropy below is not great, but better than nothing.
				(ps -gauxwww; iostat; vmstat; sysctl -a; dmesg) > /dev/random 2> /dev/random
@


1.234
log
@Reseed the random device as early as possible to prevent hangs,
and provide some form of entropy in case there is no seed file
to prevent a reboot from hanging unnecessarily.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.233 2000/10/12 21:40:04 ache Exp $
d72 2
a73 1
# Recover some entropy so the rebooting /dev/random can reseed
d80 3
a82 2
		if [ -f ${entropy_file} -a -r ${entropy_file} ]; then
			echo "Reading entropy file"
d84 1
a84 10
			rm -f ${entropy_file}
		else
			echo "No entropy file, trying other sources"
			# XXX temporary until we can get the entropy
			# harvesting rate up
			# Entropy below is not great, but better than nothing.
			(ps -gauxwww; iostat; vmstat; dmesg) > /dev/random 2> /dev/random
			( for i in /etc /var/run ; do
				cd $i ; ls -al ; cat *
			done ) > /dev/random 2> /dev/random
d178 39
@


1.233
log
@"fix" savecore by moving dev_mkdb before it to allow device name sensing
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.232 2000/10/12 10:34:59 ru Exp $
d72 25
a184 14

# Recover some entropy so the rebooting /dev/random can reseed
#
case ${entropy_file} in
[Nn][Oo] | '')
	;;
*)
	if [ -f ${entropy_file} -a -r ${entropy_file} -a -w /dev/random ]; then
		echo "Reading entropy file"
		cat ${entropy_file} > /dev/random
		rm -f ${entropy_file}
	fi
	;;
esac
@


1.232
log
@Turn the verbose mode on for dumpon(8).
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.231 2000/10/08 19:18:24 obrien Exp $
d334 4
a378 4

# Build ps databases
#
dev_mkdb
@


1.231
log
@Add copyright notices.  Other systems have been barrowing our /etc files
w/o giving any credit.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.230 2000/08/21 14:37:52 sheldonh Exp $
d343 1
a343 1
		dumpon ${dumpdev}
@


1.230
log
@Only whack pseudo-terminals into shape if they exist.  They might
not yet exist in the DEVFS case.
@
text
@d2 26
a27 1
# $FreeBSD: src/etc/rc,v 1.229 2000/08/21 14:33:20 sheldonh Exp $
d29 1
@


1.229
log
@After some discussion with markm, back out most of rev 1.221,
which really wasn't such a hot idea in retrospect.

If the random device isn't available, it probably isn't wanted.
If it's wanted, it should be enabled in loader.conf.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.228 2000/08/18 08:53:26 sheldonh Exp $
d250 5
a254 3
chflags 0 /dev/tty[pqrsPQRS]*
chmod 666 /dev/tty[pqrsPQRS]*
chown root:wheel /dev/tty[pqrsPQRS]*
@


1.228
log
@(forced commit)

The previous change should have been attributed to:

PR:		20692
Submitted by:	Andre Albsmeier <andre.albsmeier@@mchp.siemens.de>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.227 2000/08/18 08:11:23 sheldonh Exp $
d143 1
a143 9
		if ! cat ${entropy_file} 2>/dev/null >/dev/random; then
			if ! kldstat -n randomdev >/dev/null 2>&1; then
				kldload randomdev && \
				    cat ${entropy_file} 2>/dev/null >/dev/random
			fi
		fi
		if [ $? != 0 ]; then
			echo "Writing entropy file to /dev/random failed"
		fi
@


1.227
log
@The output of this script got a little broken in rev 1.225, with
the output for the linux_enable and svr4_enable stuff "floating
in the middle of nowhere".

Give them their own section, called "additional ABI support".
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.226 2000/08/18 08:07:02 sheldonh Exp $
@


1.226
log
@Don't rely on a shell scripts to do the simple job of loading
kernel modules for ibcs2_enable and svr4_enable.

Don't rely on a shell script to do the neglibly less simple
job of loading a kernel module and running one command for
linux_enable.

These shell scripts are going away.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.225 2000/08/15 18:02:49 obrien Exp $
d546 1
d569 2
@


1.225
log
@Move the running of the Linux and SVR4 compat bits to the arch independent
location.

Sponsored by:   LinuxWorld frustration
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.224 2000/08/11 03:26:22 jdp Exp $
d551 7
a557 1
	echo -n ' linux';	linux > /dev/null 2>&1
d565 1
a565 1
	echo -n ' svr4';	svr4 > /dev/null 2>&1
@


1.224
log
@Add an rc.conf knob "ldconfig_insecure" to disable ldconfig's
security checks.  Set the default to NO, i.e., secure.

Submitted by:	Maxime Henrion <mhenrion@@cybercable.fr>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.223 2000/08/09 09:23:30 brian Exp $
d545 17
@


1.223
log
@Improve purgedir():

  Fix leading & trailing space handling

  Suggested by: ben

  Handle files beginning with - correctly
  Don't follow symlinks (cd /var/spool/lock; ln -s /. horror)
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.222 2000/08/08 13:30:27 brian Exp $
d382 6
d398 1
a398 1
		ldconfig -elf ${_LDC}
d414 1
a414 1
		ldconfig -aout ${_LDC}
@


1.222
log
@Don't use find(1) before nfs filesystems have been mounted as
it lives in /usr/bin.  Instead, locate files manually.

Note, only *files* under /var/spool/lock are now deleted rather
than everything that's not a directory.  I think this is more
correct, but if anyone disagrees please feel free to change it.

Problem pointed out by: bde
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.221 2000/07/24 13:40:41 sheldonh Exp $
d168 1
a168 1
			cd "$dir" && ls | while read file
d170 4
a173 2
				[ -d "$file" ] && purgedir "$file"
				[ -f "$file" ] && rm -f "$file"
@


1.221
log
@If the initial attempt to write ${entropy_file} to /dev/random fails
and the randomdev.ko module is not resident, try to load the module and
perform the write again.

Reviewed by:	markm
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.220 2000/07/17 13:39:48 sheldonh Exp $
d159 19
d181 1
a181 1
		find /var/spool/lock ! -type d -delete
@


1.220
log
@Improve on previous commit:

Don't inhibit the trailing newline for entropy-related messages.
Try harder to save the seed file on shutdown.

Reviewed by:	markm
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.219 2000/07/17 12:28:58 markm Exp $
d141 1
a141 1
	if [ -f ${entropy_file} -a -r ${entropy_file} ]; then
d143 9
a151 1
		cat ${entropy_file} > /dev/random
@


1.219
log
@Add entropy caching. With this, some entropy is cached at shutdown
time, and this is used to reseed the random number generator at
boot time.

NOTE - this has no hope of working if you halt(); you need to
execute rc.shutdown to get the entropy stash.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.218 2000/06/08 08:57:35 brian Exp $
d141 2
a142 2
	if [ -f ${entropy_file} -a -r ${entropy_file} ] ; then
		echo -n "Reading entropy file"
@


1.218
log
@Don't attempt to rm directories under /var/spool/lock.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.217 2000/05/29 12:31:26 asmodai Exp $
d134 14
@


1.217
log
@Sanitise NFS fs mounting for /usr NFS mounts.

Submitted by:	Doug Barton <DougB@@gorean.org>
Reviewed by:	bde
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.216 2000/05/11 06:31:59 davidn Exp $
d140 1
a140 1
		rm -f /var/spool/lock/*
@


1.216
log
@Pedantic change: "reboot" -> "boot"
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.215 2000/04/27 08:43:47 sheldonh Exp $
d205 2
a206 1
if mount -d -a -t nfs | grep -q nfs >/dev/null 2>&1; then
d210 2
a211 1
fi
@


1.215
log
@Add to defaults/rc.conf a new function source_rc_confs which rc
scripts may use to source safely overrides in ${rc_conf_files}
files.

This protects users who insist on the bad practice of copying
/etc/defaults/rc.conf to /etc/rc.conf from a recursive loop
that exhausts available file descriptors.

Several people have expressed interest in breaking this function
out into its own shell script.  Anyone who wants to embark on
such an undertaking would do well to study the attributed PR.

PR:		17595
Reported by:	adrian
Submitted by:	Doug Barton <Doug@@gorean.org>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.214 2000/03/27 16:36:25 dan Exp $
d62 1
a62 1
	echo Automatic reboot in progress...
@


1.214
log
@s/grep/grep -q

Submitted by: ru
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.213 2000/03/25 16:17:53 dan Exp $
d41 1
d504 3
@


1.213
log
@Only tell the user that we're Mounting NFS file systems when we have NFS
file systems to mount.

PR: 17594
Submitted by: Doug Barton <Doug@@gorean.org>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.212 2000/02/28 19:54:06 markm Exp $
d204 1
a204 1
if mount -d -a -t nfs | grep nfs >/dev/null 2>&1; then
@


1.212
log
@Get the order of things right; the keys need to be generated
early to allow entropy to replenish.
sshd must start late to catch the full effects of ldconfig.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.211 2000/02/23 18:05:57 shin Exp $
d203 6
a208 4
# Mount NFS filesystems.
echo -n "Mounting NFS file systems"
mount -a -t nfs
echo .
@


1.212.2.1
log
@MFC: cosmetic change "reboot" -> "boot"
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.212 2000/02/28 19:54:06 markm Exp $
d61 1
a61 1
	echo Automatic boot in progress...
@


1.212.2.2
log
@MFC:	- NFS fs mounting cleanup
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.212.2.1 2000/05/11 06:35:13 davidn Exp $
d203 4
a206 6
# Mount NFS filesystems if present in /etc/fstab
if mount -d -a -t nfs | grep -q nfs >/dev/null 2>&1; then
	echo -n "Mounting NFS file systems"
	mount -a -t nfs
	echo .
fi
@


1.212.2.3
log
@MFC:	- add source_rc_confs

Reminded of, while working on the readline MFC, by:
	Mike Harding <mvh@@ix.netcom.com>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.212.2.2 2000/05/28 14:07:40 asmodai Exp $
a40 1
	source_rc_confs
@


1.212.2.4
log
@MFC:	Fix source_rc_confs comment
	Fix NFS mounting shell code
	Fix /var/spoool/lock deletion

Reminded by:	Doug Barton <DougB@@gorean.org>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.212.2.3 2000/05/28 19:17:15 asmodai Exp $
d140 1
a140 1
		find /var/spool/lock ! -type d -delete
d205 1
a205 2
case "`mount -d -a -t nfs`" in
*mount_nfs*)
d209 1
a209 2
	;;
esac
a503 3
#		source_rc_confs
#	elif [ -r /etc/rc.conf ]; then
#		. /etc/rc.conf
@


1.212.2.5
log
@MFC: Don't use find(1) before nfs filesystems are mounted
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.212.2.4 2000/06/27 09:43:30 asmodai Exp $
a135 21
 
purgedir() {
	local dir file

	if [ $# -eq 0 ]; then
		purgedir .
	else
		for dir
		do
		(
			cd "$dir" && for file in .* *
			do
				[ ."$file" = .. -o ."$file" = ... ] && continue
				[ -d "$file" -a ! -L "$file" ] &&
					purgedir "$file"
				[ -f "$file" ] && rm -f -- "$file"
			done
		)
		done
	fi
}
d140 1
a140 1
		purgedir /var/spool/lock
@


1.212.2.6
log
@MFC: move running of Linux and SVR4 bits to arch indepenent location
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.212.2.5 2000/08/15 11:02:11 brian Exp $
a516 17

# Start the Linux binary compatibility if requested.
#
case ${linux_enable} in
[Yy][Ee][Ss])
	echo -n ' linux';	linux > /dev/null 2>&1
	;;
esac

# Start the SysVR4 binary emulation if requested.
#
case ${svr4_enable} in
[Yy][Ee][Ss])
	echo -n ' svr4';	svr4 > /dev/null 2>&1
	;;
esac

@


1.212.2.7
log
@MFC rev 1.226 and rev 1.227: don't use module-loading shell scripts
and provide a missing "section" description.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.212.2.6 2000/08/15 18:06:13 obrien Exp $
a517 2
echo -n additional ABI support:

d522 1
a522 7
	echo -n ' linux'
	if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then
		kldload linux > /dev/null 2>&1
	fi
	if [ -x /compat/linux/sbin/ldconfig ]; then
		/compat/linux/sbin/ldconfig
	fi
d530 1
a530 1
	echo -n ' svr4';	kldload svr4 > /dev/null 2>&1
a533 1
echo .
@


1.212.2.8
log
@MFC: Add copyright.
@
text
@d2 1
a2 26
#
# Copyright (c) 2000  The FreeBSD Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $FreeBSD$
a3 1
#
@


1.212.2.9
log
@MFC: (rev 1.232) Turn the verbose mode on for dumpon(8).
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.8 2000/10/30 10:40:10 obrien Exp $
d327 1
a327 1
		dumpon -v ${dumpdev}
@


1.212.2.10
log
@* MFC 1.240
* Tiny ws change, reduces diff to -current

PR:		misc/21904
Submitted by:	Anton Voronin <anton@@urc.ac.ru>
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.9 2000/12/07 15:19:17 ru Exp $
a48 2
bootmode=$1

d86 1
a86 1
case ${bootmode} in
d162 1
a162 1

@


1.212.2.11
log
@MFC, Apply a more consistent style to the echo statements in /etc/ scripts.

Also MFC, Test whether /var/msgs/bounds is a link before overwriting it
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.10 2000/12/16 06:55:45 dougb Exp $
d90 1
a90 1
	echo 'Automatic boot in progress...'
d100 1
a100 1
		echo 'Reboot failed... help!'
d104 1
a104 1
		echo 'Automatic file system check failed... help!'
d108 1
a108 1
		echo 'Reboot interrupted'
d116 1
a116 1
		echo 'Unknown error in reboot'
d122 1
a122 1
	echo 'Skipping disk checks ...'
d137 1
a137 1
		echo 'Mounting root filesystem rw failed, startup aborted'
d152 1
a152 1
	echo 'Mounting /etc/fstab filesystems failed, startup aborted'
d213 1
a213 1
		echo "Adding ${swapfile} as additional swap"
d256 1
a256 1
	echo -n 'Mounting NFS file systems:'
d258 1
a258 1
	echo '.'
d282 1
a282 1
	echo -n 'Clearing /tmp:'
a287 1
	echo '.'
d299 1
a299 1
echo -n 'Additional daemons:'
d330 1
a330 1
		echo -n 'Checking for core dump: '
d346 1
a346 1
		echo -n 'Checking quotas:'
d352 1
a352 1
	echo -n 'Enabling quotas:'
d376 1
a376 1
		echo 'Turning on accounting:'
d421 1
a421 1
echo -n 'Starting standard daemons:'
d473 1
a473 1
	echo -n 'Recovering vi editor sessions:'
a507 1
	echo '.'
d511 1
d513 1
a513 1
if [ -d /var/msgs -a ! -f /var/msgs/bounds -a ! -L /var/msgs/bounds ]; then
d546 1
a546 1
echo -n 'Additional ABI support:'
d570 1
a570 1
echo '.'
d590 1
a590 1
	echo -n 'Starting local daemons:'
d613 1
a613 1
	echo '.'
d627 1
a627 1
		echo 'Raising kernel security level: '
a632 2
echo ''

a633 1

a634 1

@


1.212.2.12
log
@MFC: Add a knob "ldconfig_insecure" to control whether the ldconfig
security checks are bypassed or not.

Merges in the following revisions from the main branch:

    rc                  1.224
    defaults/rc.conf    1.74
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.11 2001/01/14 09:45:24 dougb Exp $
a388 6
ldconfig="/sbin/ldconfig"
case ${ldconfig_insecure} in
[Yy][Ee][Ss])
	ldconfig="${ldconfig} -i"
	;;
esac
d399 1
a399 1
		${ldconfig} -elf ${_LDC}
d415 1
a415 1
		${ldconfig} -aout ${_LDC}
@


1.212.2.13
log
@MFC: purgedir /var/run rather than rm /var/run/*
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.12 2001/01/28 20:57:30 jdp Exp $
d188 2
a189 1
		purgedir /var/run /var/spool/lock
@


1.212.2.14
log
@MFC: Move the syscons configuration to a machine independent rc.syscons.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.13 2001/02/13 22:31:19 brian Exp $
a543 6
fi

# Configure the system console
#
if [ -r /etc/rc.syscons ]; then
	. /etc/rc.syscons
@


1.212.2.15
log
@MFC: rev 1.240-243 & 1.246 which adds an auto dependency framework and
     entries for NFS and NIS services.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.14 2001/02/27 20:03:28 jhb Exp $
a72 29

chkdepend() {
	svc=$1
	svc_var=$2
	dep=$3
	dep_var=$4

	eval svc_val=\${$svc_var}
	eval dep_val=\${$dep_var}

	case ${svc_val} in
	[Yy][Ee][Ss])
		case ${dep_val} in
		[Yy][Ee][Ss])
		    ;;
		*)
		    eval ${dep_var}="YES"
		    echo "DEPENDENCY NOTE: ${dep} will be enabled" \
			 "to support ${svc}"
		    ;;
		esac
		;;
	esac
}

chkdepend amd amd_enable        portmap portmap_enable
chkdepend NFS nfs_server_enable portmap portmap_enable
chkdepend NIS nis_server_enable portmap portmap_enable
chkdepend NIS nis_client_enable portmap portmap_enable
@


1.212.2.16
log
@MFC the ability to specify the specific cron program to run, and
flags to supply to it.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.15 2001/02/28 18:44:47 obrien Exp $
d469 1
a469 1
	echo -n ' cron';	${cron_program:-/usr/sbin/cron} ${cron_flags}
@


1.212.2.17
log
@MFC the ability to tell rc to fsck -y if the initial preen
of the filesystems fail.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.16 2001/03/05 05:56:41 dougb Exp $
d133 2
a134 18
		case ${fsck_y_enable} in
		[Yy][Ee][Ss])
			echo 'File system preen failed, trying fsck -y . . .'
			fsck -y
			case $? in
			0)
				;;
			*)
			echo 'Automatic file system check failed . . . help!'
				exit 1
				;;
			esac
			;;
		*)
			echo 'Automatic file system check failed . . . help!'
			exit 1
			;;
		esac
@


1.212.2.18
log
@MFC: add copyright notices
@
text
@d27 1
a27 27
#
# Copyright (c) 2000  The FreeBSD Project
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $FreeBSD: src/etc/rc,v 1.212.2.17 2001/03/05 06:04:12 dougb Exp $
@


1.212.2.19
log
@Blah! got double copyrights on this one
@
text
@d27 27
a53 1
# $FreeBSD: src/etc/rc,v 1.212.2.18 2001/03/06 01:58:44 obrien Exp $
@


1.212.2.20
log
@MFC: 1.230: Only whack pseudo-terminals into shape if they exist.  They might
            not yet exist in the DEVFS case.
     1.244: Apply a more consistent style to the echo statements in /etc/
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.19 2001/03/06 02:06:05 obrien Exp $
d308 3
a310 5
if ls /dev/tty[pqrsPQRS]* > /dev/null 2>&1; then
	chflags 0 /dev/tty[pqrsPQRS]*
	chmod 666 /dev/tty[pqrsPQRS]*
	chown root:wheel /dev/tty[pqrsPQRS]*
fi
d448 1
a448 1
		echo 'ELF ldconfig path:' ${_LDC}
d464 1
a464 1
		echo 'a.out ldconfig path:' ${_LDC}
@


1.212.2.21
log
@MFC: move dev_mkdb earlier to avoid warnings.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.20 2001/03/06 02:13:30 obrien Exp $
a366 4
# Build devices database
#
dev_mkdb

d408 4
@


1.212.2.22
log
@MFC: load streams before svr4
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.21 2001/03/07 20:13:56 jkh Exp $
d625 1
a625 3
	echo -n ' svr4';
	kldload streams > /dev/null 2>&1
	kldload svr4 > /dev/null 2>&1
@


1.212.2.23
log
@Fixes for diskless support.
in /etc/rc, let rc.diskless2 do the necessary mounts instead of
running mount -a -t nonfs

in /etc/rc.diskless2, do the various mounts in the right order

Approved-by: jkh
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.22 2001/04/14 02:32:22 jkh Exp $
a56 2
# See /usr/share/examples/diskless/clone_root for details on how
# to setup diskless on the client and the server.
d190 2
a191 8
# If using diskless, run custom disk mounting function here
#
if [ -n "${diskless_mount}" -a -r "${diskless_mount}" ]; then
	sh ${diskless_mount}
else
# otherwise mount everything except nfs filesystems.
	mount -a -t nonfs
fi
d202 5
@


1.212.2.24
log
@Use vnconfig's "swap" feature to turn on swapping, instead of "&& swapon"
on the command line.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.23 2001/04/17 15:52:28 luigi Exp $
d261 1
a261 1
		vnconfig -e /dev/vn0b ${swapfile} swap
@


1.212.2.25
log
@Remove sockets as well as regular files in /var/run and /var/spool/lock
at boot time.  This restores the pre-4.3 behaviour.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.24 2001/04/25 09:19:03 nik Exp $
d227 1
a227 1
				[ -f "$file" -o -S "$file" ] && rm -f -- "$file"
@


1.212.2.26
log
@MFC rev. 1.266:
Don't confuse the admin with spurious error messages
about non-existent mount directories (which would come
into existence after the real mount has occured) when just
testing for if there are any NFS filesystems in /etc/fstab.

PR:             bin/26597
Submitted by:   Dmitry Morozovsky <marck@@rinet.ru>
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.25 2001/05/09 07:24:47 brian Exp $
d301 1
a301 1
case "`mount -d -a -t nfs 2> /dev/null`" in
@


1.212.2.27
log
@MFC: Delete everything that's not a directory in /var/run and /var/spool/lock
     at boot time.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.26 2001/05/30 13:15:06 yar Exp $
d225 1
a225 2
				if [ -d "$file" -a ! -L "$file" ]
				then
d227 1
a227 3
				else
					rm -f -- "$file"
				fi
@


1.212.2.28
log
@MFC rev 1.268: support smbfs auto mounts in /etc/fstab
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.27 2001/05/31 21:12:23 brian Exp $
a191 2
remotefs_types='nfs:NFS smbfs:SMB'

d197 2
a198 8
# otherwise mount everything except remote filesystems.
	mount_excludes='no'
	for i in ${remotefs_types}; do
		fstype=${i%:*}
		mount_excludes="${mount_excludes}${fstype},"
	done
	mount_excludes=${mount_excludes%,}
	mount -a -t ${mount_excludes}
d303 8
a310 13
# Mount remote filesystems if present in /etc/fstab
remotefs_types='nfs:NFS smbfs:SMB'
for i in ${remotefs_types}; do
	fstype=${i%:*}
	fsdecr=${i#*:}
	case "`mount -d -a -t ${fstype}`" in
	*mount_${fstype}*)
		echo -n "Mounting ${fsdecr} file systems:"
		mount -a -t ${fstype}
		echo '.'
		;;
	esac
done
@


1.212.2.29
log
@MFC rev 1.269: back out support for smbfs auto mounts.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.28 2001/06/09 09:50:20 sheldonh Exp $
d192 2
d199 8
a206 2
# otherwise mount everything except nfs filesystems.
	mount -a -t nonfs
d311 13
a323 8
# Mount NFS filesystems if present in /etc/fstab
case "`mount -d -a -t nfs 2> /dev/null`" in
*mount_nfs*)
	echo -n 'Mounting NFS file systems:'
	mount -a -t nfs
	echo '.'
	;;
esac
@


1.212.2.30
log
@MFC: syslogd_program and inetd_program
@
text
@d27 1
a27 1
# $FreeBSD$
d367 1
a367 2
	echo -n ' syslogd';
	${syslogd_program:-/usr/sbin/syslogd} ${syslogd_flags}
d485 1
a485 1
	echo -n ' inetd'; ${inetd_program:-/usr/sbin/inetd} ${inetd_flags}
@


1.212.2.31
log
@Removing old, broken DEVFS from -stable phase one: remove support
code, everything under #ifdef DEVFS (and thus opt_devfs.h), and most
references to the DEVFS routines.  Code that really couldn't be
reached was left alone.  Removal of the actual DEVFS implementation
will come later.

Approved by:	-stable
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.30 2001/07/23 10:02:12 dd Exp $
d604 6
@


1.212.2.32
log
@MFC: run the shutdown scripts in reverse order; script_name_sep knob.

MFC of file revisions:
	rc		1.272
	rc.shutdown	1.17
	rc.conf		1.117
	rc.conf.5	1.113
@
text
@d27 1
a27 1
# $FreeBSD$
a663 1
	slist=""
d667 5
a671 1
				slist="${slist}${script_name_sep}${script}"
a674 10
	script_save_sep="$IFS"
	IFS="${script_name_sep}"
	for script in ${slist}; do
		if [ -x "${script}" ]; then
			(set -T
			trap 'exit 1' 2
			${script} start)
		fi
	done
	IFS="${script_save_sep}"
@


1.212.2.33
log
@MFC: savecore_flags support and use fully qualified path for savecore
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.32 2001/07/31 16:16:28 roam Exp $
d387 1
a387 1
		/sbin/dumpon -v ${dumpdev}
d389 1
a389 1
		/sbin/savecore ${savecore_flags} /var/crash
@


1.212.2.34
log
@MFC: At great personal risk, touch the sendmail startup again.  This adds
easy seperate knobs for inbound (accepting SMTP connections) and outbound
(just occasionally dequeueing) sendmail daemon startup.

For RELENG_4, we default to inbound turned on, outbound-only turned off.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.33 2001/08/01 19:50:33 obrien Exp $
d504 8
a525 17

if [ -r /etc/mail/sendmail.cf ]; then
	case ${sendmail_enable} in
	[Yy][Ee][Ss])
		echo -n ' sendmail'
		/usr/sbin/sendmail ${sendmail_flags}
		;;
	*)
		case ${sendmail_outbound_enable} in
		[Yy][Ee][Ss])
			echo -n ' sendmail'
			/usr/sbin/sendmail ${sendmail_outbound_flags}
			;;
		esac
		;;
	esac
fi
@


1.212.2.34.2.1
log
@MFC 1.312: Remove dangerous use of globbing.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.34 2001/08/01 19:59:05 obrien Exp $
d347 1
a347 3
rm -f /tmp/.X*-lock
rm -fr /tmp/.X11-unix
mkdir -m 1777 /tmp/.X11-unix
@


1.212.2.35
log
@MFC: (1.284) parametrize the dump directory.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.34 2001/08/01 19:59:05 obrien Exp $
d386 1
a386 4
	if [ -z "${dumpdir}" ]; then
		dumpdir="/var/crash"
	fi
	if [ -e "${dumpdev}" -a -d "${dumpdir}" ]; then
d389 1
a389 1
		/sbin/savecore ${savecore_flags} "${dumpdir}"
@


1.212.2.36
log
@MFC: the /etc/rc.early escape for early boot jobs.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.35 2001/11/27 13:53:42 des Exp $
a117 6

# Last chance to do things before potentially waiting for
# operator to do fsck related tasks
if [ -r /etc/rc.early ]; then
	. /etc/rc.early
fi
@


1.212.2.37
log
@MFC: set script_name_sep to a sensible value of " " if it is not set.
@
text
@d27 1
a27 1
# $FreeBSD$
a682 3
	if [ -z "${script_name_sep}" ]; then
		script_name_sep=" "
	fi
@


1.212.2.38
log
@MFC: s/sysctl -w/sysctl/
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.37 2001/12/19 14:40:28 roam Exp $
d718 1
a718 1
		sysctl kern.securelevel=${kern_securelevel}
@


1.212.2.38.2.1
log
@MFC 1.312: Remove dangerous use of globbing.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.38 2001/12/19 17:52:17 ru Exp $
d353 1
a353 3
rm -f /tmp/.X*-lock
rm -fr /tmp/.X11-unix
mkdir -m 1777 /tmp/.X11-unix
@


1.212.2.39
log
@MFC: Use MACHINE_ARCH instead of MACHINE.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.38 2001/12/19 17:52:17 ru Exp $
d472 1
a472 1
	case `sysctl -n hw.machine_arch` in
d613 1
a613 1
arch=`uname -p`
@


1.212.2.40
log
@MFC 1.295: Remove check for sendmail.conf before even trying to start
sendmail.

PR:		conf/34993
Reviewed by:	gshapiro
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.39 2002/02/09 03:11:30 nyan Exp $
d528 2
a529 7
case ${sendmail_enable} in
[Yy][Ee][Ss])
	echo -n ' sendmail'
	/usr/sbin/sendmail ${sendmail_flags}
	;;
*)
	case ${sendmail_outbound_enable} in
d532 9
a540 1
		/usr/sbin/sendmail ${sendmail_outbound_flags}
d543 1
a543 2
	;;
esac
@


1.212.2.41
log
@MFC: register amd's dependency on NFS

	rc		rev 1.292
	rc.network	rev 1.121
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.40 2002/02/18 13:19:35 cjc Exp $
a100 1
chkdepend amd amd_enable        NFS nfs_client_enable
@


1.212.2.42
log
@Revert previous delta.  The patch wasn't properly tailored to -STABLE,
where nfcslient.ko does not exist.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.41 2002/02/27 10:36:03 sheldonh Exp $
d101 1
@


1.212.2.43
log
@Re-introduce registration of amd's dependency on nfs.  This time,
load nfs.ko, not nfsclient.ko.  The change has been tested for
kernels with and without NFS support wired in.

This change was originally MFC'd as

	rev 1.212.2.41 of src/etc/rc
	rev 1.74.2.32 of src/etc/rc.network
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.42 2002/03/04 08:37:33 sheldonh Exp $
a100 1
chkdepend amd amd_enable        NFS nfs_client_enable
@


1.212.2.44
log
@MFC: Don't protect dumpon(8) and dumpdir(8) from failing. Move
dumpon(8) to very early in the rc(8) script so crashes during boot may
be caught. Update the documentation.

	src/etc/rc			1.297, 1.298
	src/share/man/man5/rc.conf.5	1.137, 1.154

PR:		conf/35725
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.43 2002/03/07 18:10:02 sheldonh Exp $
a105 10
# Enable dumpdev early so that a crash during the boot process can be caught.
#
case ${dumpdev} in
[Nn][Oo] | '')
	dumpdev='NO'
	;;
*)
	/sbin/dumpon -v ${dumpdev}
esac

d385 2
a386 1
# $dumpdir should be a directory or a symbolic link
d389 9
a397 11
if [ "${dumpdev}" != 'NO' ]; then
	case ${dumpdir} in
	'')
		dumpdir='/var/crash'
		;;
	[Nn][Oo])
		dumpdir='NO'
		;;
	esac

	if [ "$dumpdir" != 'NO' ]; then
d401 2
a402 1
fi
@


1.212.2.45
log
@MFC: Add infrastructure for sendmail 8.12.  If users are not starting a daemon
     at boot (sendmail_enable=NO), a localhost-only daemon may started
     (sendmail_submit_enable) as it is needed to accept mail from command line
     submissions.  If this isn't desired, see etc/mail/README for more hints.

     Optionally (sendmail_msp_queue_enable) start a queue runner for the
     submission queue in case a daemon isn't available to accept command line
     submitted mail at submission time.

     Note that the syslog labels for all of these sendmail processes have been
     uniquified for easier log parsing.

     Revision  Changes    Path
     1.138     +9 -3      src/etc/defaults/rc.conf
     1.296     +17 -2     src/etc/rc
     1.151     +36 -0     src/share/man/man5/rc.conf.5
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.44 2002/03/17 09:52:31 cjc Exp $
d547 1
a547 1
		echo -n ' sendmail-outbound'
a550 6
	case ${sendmail_submit_enable} in
	[Yy][Ee][Ss])
		echo -n ' sendmail-submit'
		/usr/sbin/sendmail ${sendmail_submit_flags}
		;;
	esac
a552 9

if [ -r /etc/mail/submit.cf ]; then
	case ${sendmail_msp_queue_enable} in
	[Yy][Ee][Ss])
		echo -n ' sendmail-clientmqueue'
		/usr/sbin/sendmail ${sendmail_msp_queue_flags}
		;;
	esac
fi
@


1.212.2.46
log
@MFC: Provide a way for users to completely prevent sendmail from trying to
     start at boot time.

     Instead of rc.conf's sendmail_enable only accepting YES or NO, it can
     now also accept NONE.  If set to NONE, none of the other sendmail
     related startup items will be done.

     Remove an extra queue running daemon might be started that wasn't
     necessary (it didn't hurt anything but it wasn't needed).

     The new logic is:

    # MTA
    if ${sendmail_enable} == NONE
            # Do nothing
    else if ${sendmail_enable} == YES
            start sendmail with ${sendmail_flags}
    else if ${sendmail_submit_enable} == YES
            start sendmail with ${sendmail_submit_flags}
    else if ${sendmail_outbound_enable} == YES
            start sendmail with ${sendmail_outbound_flags}
    endif
    # MSP Queue Runner
    if ${sendmail_enable} != NONE &&
       [ -r /etc/mail/submit.cf] && ${sendmail_msp_queue_enable} == YES
            start sendmail with ${sendmail_msp_queue_flags}
    endif

    Revision  Changes    Path
    1.141     +7 -6      src/etc/defaults/rc.conf
    1.307     +27 -15    src/etc/rc
    1.158     +14 -5     src/share/man/man5/rc.conf.5
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.45 2002/03/25 21:41:28 gshapiro Exp $
a538 2
# Note: Please keep the sendmail startup code here in sync with the code
#       in src/etc/mail/Makefile.
a539 2
[Nn][Oo][Nn][Ee])
	;;
d545 6
a555 8
	*)
		case ${sendmail_outbound_enable} in
		[Yy][Ee][Ss])
			echo -n ' sendmail-outbound'
			/usr/sbin/sendmail ${sendmail_outbound_flags}
			;;
		esac
		;;
d560 8
a567 14
case ${sendmail_enable} in
[Nn][Oo][Nn][Ee])
	;;
*)
	if [ -r /etc/mail/submit.cf ]; then
		case ${sendmail_msp_queue_enable} in
		[Yy][Ee][Ss])
			echo -n ' sendmail-clientmqueue'
			/usr/sbin/sendmail ${sendmail_msp_queue_flags}
			;;
		esac
	fi
	;;
esac
@


1.212.2.47
log
@MFC: Quoting Peter Wemm, "At great personal risk, touch the sendmail startup
     again."

     As an alternative to sendmail_enable=NONE, solve the boot time problem
     for non-sendmail users completely by moving all of the sendmail startup
     code from /etc/rc to /etc/rc.sendmail.  The source for that script will
     be kept in src/etc/sendmail/rc.sendmail so make.conf's NO_SENDMAIL will
     prevent it from being installed.  A new rc.conf variable,
     mta_start_script specifies the script to run to start the user's
     preferred MTA.  For backward compatibility, it will default to
     /etc/rc.sendmail.  The specified script is called out of /etc/rc after
     checking to make sure it exists.  A new rc.sendmail.8 man page has also
     been added which now houses the sendmail_* variable descriptions
     formerly in rc.conf.5.

     Use /etc/rc.sendmail in /etc/mail/Makefile to reduce code duplication.

     Reviewed by:    -current, -stable, obrien, peter, ru
     MFC after:      1 week

     Revision  Changes    Path
     1.142     +19 -10    src/etc/defaults/rc.conf
     1.27      +38 -70    src/etc/mail/Makefile
     1.308     +5 -39     src/etc/rc
     1.16      +3 -1      src/etc/sendmail/Makefile
     1.1       +193 -0    src/etc/sendmail/rc.sendmail (new)
     1.160     +13 -105   src/share/man/man5/rc.conf.5
     1.26      +4 -0      src/share/man/man8/Makefile
     1.1       +241 -0    src/share/man/man8/rc.sendmail.8 (new)
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc,v 1.212.2.46 2002/04/05 01:58:22 gshapiro Exp $
d539 38
a576 4
case ${mta_start_script} in
/*)
	if [ -r ${mta_start_script} ]; then
		sh ${mta_start_script}
@


1.212.2.48
log
@MFC en masse. Several of the included changes are mine, however we've
gotten pretty far out of synch with -current over the last year or so,
this catches us up for everything that makes sense.

There are several whitespace only changes here. In an ideal world I
would have had time to seperate them out, however I did not. Most of
them are included to be consistent with -current, some of them are
"improvements" that happened while I was adding things back.

Of particular note:
/var/log/auth.log
/var/run and /var/spool cleanup in rc
Early and late rc.sysctl runs
New mailq/queurun support in daily scripts
@
text
@d27 2
a28 2
#	@@(#)rc	5.27 (Berkeley) 6/5/91
# $FreeBSD$
d52 1
a52 1
PATH=/sbin:/bin:/usr/sbin:/usr/bin
a113 1
	;;
d227 1
d255 3
a257 2
	if [ -d /var/run -a ! -f /var/run/clean_var ]; then
		purgedir /var/run
a263 5
	if [ -d /var/spool/lock -a ! -f /var/spool/lock/clean_var ]; then
		purgedir /var/spool/lock
		>/var/spool/lock/clean_var
	fi
	rm -rf /var/spool/uucp/.Temp/*
d266 6
a271 5
# network_pass1() *may* end up writing stuff to /var - we don't want to
# remove it immediately afterwards - *nor* do we want to fail to clean
# an NFS-mounted /var.
rm -f /var/run/clean_var /var/spool/lock/clean_var
clean_var
d286 1
a286 1
# Early pass to set the variables we can
d289 1
a289 1
	sh /etc/rc.sysctl first
a320 1
#
d340 1
a340 1
rm /var/run/clean_var /var/spool/lock/clean_var
d378 1
a378 1
	if [ ! -L /dev/log ]; then
d408 1
a408 1
	if [ "${dumpdir}" != 'NO' ]; then
a701 2
		elif [ -f "${script}" -o -L "${script}" ]; then
			echo -n " (skipping ${script##*/}, not executable)"
a710 6
fi

# Late pass to set variables we missed the first time
#
if [ -r /etc/rc.sysctl ]; then
	sh /etc/rc.sysctl last
@


1.212.2.49
log
@MFC reboot -k option to specify next kernel to boot.
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.212.2.48 2002/04/15 00:44:13 dougb Exp $
a331 5

# If we booted a special kernel remove the record so we will boot
# the default kernel next time
#
rm -f /boot/nextboot.conf
@


1.212.2.50
log
@MFC 1.312: Remove dangerous use of globbing.

Approved by:	re
@
text
@d28 1
a28 1
# $FreeBSD: src/etc/rc,v 1.212.2.49 2002/04/28 22:49:59 wes Exp $
d373 1
a373 3
rm -f /tmp/.X*-lock
rm -fr /tmp/.X11-unix
mkdir -m 1777 /tmp/.X11-unix
@


1.212.2.51
log
@MFC: correct style bugs (whitespace, "then" style). No content changes.
@
text
@d28 1
a28 1
# $FreeBSD$
d89 1
a89 1
			;;
d91 4
a94 4
			eval ${dep_var}="YES"
			echo "DEPENDENCY NOTE: ${dep} will be enabled" \
				"to support ${svc}"
			;;
d201 1
a201 1
	if ! mount -u -o rw /; then
d242 2
a243 1
				if [ -d "$file" -a ! -L "$file" ]; then
@


1.212.2.51.8.1
log
@MFS:
Remove and recreate with correct permissions/owner three additional X socket
directories.

Approved by:	re (kensmith)
@
text
@d373 2
a374 2
rm -fr /tmp/.X11-unix /tmp/.ICE-unix /tmp/.font-unix /tmp/.XIM-unix
mkdir -m 1777 /tmp/.X11-unix /tmp/.ICE-unix /tmp/.font-unix /tmp/.XIM-unix
@


1.212.2.52
log
@Remove and recreate with correct permissions/owner three additional X socket
directories.

Submitted by:	lesi
@
text
@d373 2
a374 2
rm -fr /tmp/.X11-unix /tmp/.ICE-unix /tmp/.font-unix /tmp/.XIM-unix
mkdir -m 1777 /tmp/.X11-unix /tmp/.ICE-unix /tmp/.font-unix /tmp/.XIM-unix
@


1.212.2.53
log
@Switch importer
@
text
@d28 1
a28 1
# $FreeBSD: stable/4/etc/rc 140201 2005-01-13 21:50:14Z anholt $
@


1.211
log
@Add IPv6 configuration scripts.

Initial version created by, and kindly much tested by:
	bmah@@CA.Sandia.GOV (Bruce A. Mah)

Approved by: jkh

Reviewed by: bmah@@CA.Sandia.GOV (Bruce A. Mah),
	Ollivier Robert <roberto@@keltia.freenix.fr>
Obtained from: KAME project
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.210 2000/02/03 06:06:36 nsayer Exp $
d394 9
@


1.210
log
@/dev/vn0b is a character device now.

Approved by:	jkh
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.209 2000/01/15 14:28:05 green Exp $
d193 9
@


1.209
log
@This is another in Martin Blapp's N-series of mount-related cleanups :)
Changes are:
 - rpc.umntall is called at the right places now in /etc/rc*
 - rpc.umntall timeout has been lowered from two days (too high) to one
 - verbose messages in rpc.umntall have been clarified
 - kill double entries in /var/db/mounttab when rpc.umntall is invoked
 - ${early_nfs_mounts} has been removed from /etc/rc
 - patched mount(8) -p to print different pass/dump values for ufs filesystems.
   (last patch recieved from dan <bugg@@bugg.strangled.net>)

Submitted by:	Martin Blapp <mbr@@imp.ch>, dan <bugg@@bugg.strangled.net>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.208 2000/01/06 14:27:37 peter Exp $
d162 1
a162 1
	if [ -w "${swapfile}" -a -b /dev/vn0b ]; then
@


1.208
log
@Third try..  Avoid filenames with spaces in them.

PR:		15937
Pointed out by:	Koga Youichirou <y-koga@@jp.FreeBSD.org>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.207 2000/01/05 09:19:27 peter Exp $
d116 2
a117 17
# Early NFS mounts and clean up of /var/db/mounttab.
#
case ${early_nfs_mounts} in
[Yy][Ee][Ss])
	case $1 in
	autoboot)
		if [ -f /var/db/mounttab ]; then
			rpc.umntall -k
		fi
		;;
	esac
	mount -a
	;;
*)
	mount -a -t nonfs
	;;
esac
d194 1
a194 3
# Only mount NFS file systems if $early_nfs_mounts is false.
# If there is a /var/db/mounttab, clean it up with rpc.umntall.
#
d196 1
a196 18
case ${early_nfs_mounts} in
[Yy][Ee][Ss])
	;;
*)
	case $1 in
	autoboot)
		case ${nfs_client_enable} in
		[Yy][Ee][Ss])
			if [ -f /var/db/mounttab ]; then
				rpc.umntall -k
			fi
			;;
		esac
		;;
	esac
	mount -a -t nfs
	;;
esac
@


1.207
log
@Missed a filename variable quote in rc
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.206 2000/01/05 08:17:18 peter Exp $
d436 1
a436 1
	for i in ${vibackup}; do
d453 1
a453 1
		for i in ${virecovery}; do
@


1.206
log
@Quote arguments in vi recover script.

PR:		15901
Submitted by:	KOJIMA Hajime <kjm@@rins.ryukoku.ac.jp>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.205 1999/12/27 07:43:07 peter Exp $
d462 1
a462 1
			recfile=`awk '/^X-vi-recover-path:/{print $2}' < ${i}`
@


1.205
log
@Remove kvm_mkdb as it isn't installed anymore.  libkvm asks directly
via kldsym(2), and crash dumps use nlist directly (and always have).
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.204 1999/12/19 22:05:32 obrien Exp $
d445 1
a445 1
			rm -f ${i}
d464 1
a464 1
				sendmail -t < ${i}
d466 1
a466 1
				rm -f ${i}
@


1.204
log
@Install sendmail.cf into /etc/mail.

The current offical Sendmail Inc. version uses /var/mail/ and when we upgrade
our repository to that version, we will get the change.  It is best to make
the path change in 4.0-R (which may not have the latest Sendmail Inc. version,
than to change in mid-4.x stream when we may upgrade.

Ok'ed by:	Peter (quite a while ago)
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.203 1999/11/30 03:34:01 ache Exp $
a334 1
kvm_mkdb
@


1.203
log
@Call rpc.umntall only if nfs_client_enable, hang occurse otherwise
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.202 1999/11/22 04:23:08 dillon Exp $
d418 1
a418 1
	if [ -r /etc/sendmail.cf ]; then
@


1.202
log
@    Finish up umntall support.  init now passed an argument to the
    rundown script 'reboot' or 'single'.  ISO support (which never
    worked) has been removed from mount_nfs.  mount_nfs and umount
    now use mounttab, which allows umntall to work properly.  The
    rc scripts now call umntall as appropriate.

Submitted by:	Martin Blapp <mb@@imp.ch>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.201 1999/11/17 22:38:01 ache Exp $
d219 7
a225 3
		if [ -f /var/db/mounttab ]; then
			rpc.umntall -k
		fi
@


1.201
log
@Add network pass4 - after all local (/usr/local/etc/rc.d f.e.)
daemons started. Move log_in_vain option there. It is needed to avoid
lot of connections to port 80 logged on production WWW server prior
Apache started from /usr/local/etc/rc.d
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.200 1999/09/24 06:49:00 nsayer Exp $
d116 1
a116 1
# Where/how would this get set?
d120 7
d209 2
a210 1
# Retest for early_nfs here?
d213 14
a226 1
mount -a -t nfs
@


1.200
log
@Slight reordering of /etc/rc order: It now goes

...
recover vi
msgs/bounds
update MOTD
rc.{arch}
rc.devfs
rc.local
$local.startup
securelevel

The motive behind this is to delay rc.{arch} as long as possible,
as it loads the screensaver, which kills the splash screen.
But at the same time, it can't be done after rc.devfs, as
that might depend on arch specific actions. rc.local and local.startup
also should come after these, and securelevel must be last of all.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.199 1999/09/22 06:31:31 jkoshy Exp $
d525 4
@


1.199
log
@Remove the "vinum_drives" rc.conf knob.  According to Greg <grog@@lemis.com>
this is no longer the right way to start Vinum unless you are doing some
kind of maintenance, and that's not the sort of thing that would go into
rc.conf.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.198 1999/09/13 15:44:18 sheldonh Exp $
a406 7
# Configure implementation specific stuff
#
arch=`uname -m`
if [ -r /etc/rc.${arch} ]; then
	. /etc/rc.${arch}
fi

a454 22
# For each valid dir in $local_startup, search for init scripts matching *.sh
#
case ${local_startup} in
[Nn][Oo] | '')
	;;
*)
	echo -n 'Local package initialization:'
	for dir in ${local_startup}; do
		if [ -d "${dir}" ]; then
			for script in ${dir}/*.sh; do
				if [ -x "${script}" ]; then
					(set -T
					 trap 'exit 1' 2
					 ${script} start)
				fi
			done
		fi
	done
	echo .
	;;
esac

d471 7
d503 22
@


1.198
log
@Apply a consistent style to most of the etc scripts.  Particularly, use
case instead of test where appropriate, since case allows case is a sh
builtin and (as a side-effect) allows case-insensitivity.

Changes discussed on freebsd-hackers.

Submitted by:	Doug Barton <Doug@@gorean.org>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.197 1999/09/12 18:13:11 roberto Exp $
a53 5
	;;
*)
	if [ -n "${vinum_drives}" ]; then
		vinum read ${vinum_drives}
	fi
@


1.197
log
@This fix adds checking for the existance of the /var/msgs
directory before attempting to create the bounds file.

PR:		bin/13184
Submitted by:	"Stephen J. Roznowski" <sjr@@home.net>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.196 1999/08/30 03:34:46 imp Exp $
d10 4
a13 3
# Note that almost all the user-configurable behavior is no longer in
# this file, but rather in /etc/defaults/rc.conf.  Please check this file
# first before contemplating any changes here.
d19 1
d23 1
a23 1
HOME=/; export HOME
d25 1
a25 1
export PATH
d30 1
a30 1
if [ -f /etc/rc.diskless1 ]; then
d39 1
a39 1
if [ -f /etc/defaults/rc.conf ]; then
d41 1
a41 1
elif [ -f /etc/rc.conf ]; then
d46 2
a47 1
if [ -f /etc/ccd.conf ]; then
d51 2
a52 1
if [ "${start_vinum}" = "YES" ]; then
d54 7
a60 3
elif [ -n "${vinum_drives}" ]; then
	vinum read ${vinum_drives}
fi
d64 2
a65 1
if [ "$1" = "autoboot" ]; then
d96 2
a97 1
else
d99 2
a100 1
fi
d108 10
a117 9

if [ "${root_rw_mount}" != "NO" ]; then
	mount -u -o rw /
fi

if [ $? != 0 ]; then
	echo "Filesystem mount failed, startup aborted"
	exit 1
fi
d121 7
a127 1
if [ "${early_nfs_mounts}" != "YES" ]; then
d129 8
a136 5
else
	mount -a
fi
if [ $? != 0 ]; then
	echo "Filesystem mount failed, startup aborted"
d138 2
a139 1
fi
d143 1
a143 3

if [ -n "${diskless_mount}" ]; then
	if [ -f "${diskless_mount}" ]; then
a144 1
	fi
d157 1
a157 1
		(cd /var/run && cp /dev/null utmp && chmod 644 utmp; )
d170 11
a180 4
if [ "${swapfile}" != "NO" -a -w "${swapfile}" -a -b /dev/vn0b ]; then
	echo "Adding ${swapfile} as additional swap."
	vnconfig /dev/vn0b ${swapfile} && swapon /dev/vn0b
fi
d182 3
a184 2
# set sysctl variables early as we can
if [ -f /etc/rc.sysctl ]; then
d188 3
a190 2
# configure serial devices
if [ -f /etc/rc.serial ]; then
d194 3
a196 2
# start up PC-card configuration
if [ -f /etc/rc.pccard ]; then
d200 3
a202 2
# start up the initial network configuration.
if [ -f /etc/rc.network ]; then
d207 2
d214 1
d219 2
a220 1
# clean up left-over files
a223 1
#
d231 2
a232 1
if [ "${clear_tmp_enable}" = "YES" ]; then
a233 1

d237 4
a240 2
	    find -d . ! -name . ! -name lost+found ! -name quota.user \
	    ! -name quota.group -exec rm -rf -- {} \;)
d242 1
a242 3
fi

# Remove X lock files, since they will prevent you from restarting X11 
d244 1
d247 2
a248 2
# snapshot any kernel -c changes back to disk here <someday>
# this has changed with ELF and /kernel.config.
d251 3
a253 2
# start system logging and name service (named needs to start before syslogd
# if you don't have a /etc/resolv.conf)
d255 2
a256 1
if [ "${syslogd_enable}" = "YES" ]; then
d258 2
a259 2
	# binaries had a chance to move towards /var/run/log.
	if [ ! -h /dev/log ] ; then
d265 4
a268 2
	echo -n ' syslogd';		syslogd ${syslogd_flags}
fi
d271 1
a271 1
# enable dumpdev so that savecore can see it
d274 12
a285 5
if [ "${dumpdev}" != "NO" -a -e ${dumpdev} -a -d /var/crash ]; then
	dumpon ${dumpdev}
	echo -n checking for core dump...
	savecore /var/crash
fi
d292 10
a301 1
if [ "${enable_quotas}" = "YES" ]; then
d303 5
a307 11
    # Only check quotas if they have been previously enabled, and requested
    if [ "${check_quotas}" = "YES" ]; then
            echo -n 'checking quotas:'
            quotacheck -a
            echo ' done.'
    fi

        echo -n 'enabling quotas:'
        quotaon -a
        echo ' done.'
fi
d313 3
a315 3

# build ps databases
kvm_mkdb 
d318 3
a320 3
# check the password temp/lock file
if [ -f /etc/ptmp ]
then
d325 8
a332 4
if [ "${accounting_enable}" = "YES" -a -d /var/account ]; then
	echo 'turning on accounting'
	if [ ! -e /var/account/acct ]; then
		touch /var/account/acct
d334 2
a335 2
	accton /var/account/acct
fi
d339 1
d341 2
a342 1
	if [ "`/usr/bin/objformat`" = "elf" ]; then
d345 1
a345 1
			if test -d ${i}; then
d351 2
a352 1
	fi
d355 2
a356 1
	if [ "`sysctl -n hw.machine`" = "i386" ]; then
d361 1
a361 1
			if test -d ${i}; then
d367 2
a368 1
	fi
d374 4
a377 1
if [ "${inetd_enable}" != "NO" ]; then
d379 2
a380 1
fi
d382 4
a385 1
if [ "${cron_enable}" != "NO" ]; then
d387 2
a388 1
fi
d390 13
a402 3
if [ "${lpd_enable}" = "YES" ]; then
	echo -n ' printer';		${lpd_program} ${lpd_flags}
fi
d404 2
a405 5
if [ "${sendmail_enable}" = "YES" -a -r /etc/sendmail.cf ]; then
	echo -n ' sendmail';	/usr/sbin/sendmail ${sendmail_flags}
fi

if [ "${usbd_enable}" = "YES" ]; then
d407 2
a408 1
fi
d412 2
a413 1
# configure implementation specific stuff
d415 1
a415 1
if [ -f /etc/rc.${arch} ]; then
d426 1
a426 1
		if test ! -r ${i}; then
d432 1
a432 1
		if test -x ${i} -o ! -s ${i}; then
d443 1
a443 1
			if test ! -r ${i}; then
d451 1
a451 1
			if test -n "${recfile}" -a -s "${recfile}"; then
d460 4
a463 2
# make a bounds file for msgs(1) if there isn't one already
if [ -d /var/msgs -a  ! -f /var/msgs/bounds ]; then
d467 6
a472 2
# for each valid dir in $local_startup, search for init scripts matching *.sh
if [ "${local_startup}" != "NO" ]; then
d475 9
a483 4
		[ -d ${dir} ] && for script in ${dir}/*.sh; do
			[ -x ${script} ] && \
				(set -T ; trap 'exit 1' 2 ; ${script} start)
		done
d486 2
a487 1
fi
d489 5
a493 3
if [ "${update_motd}" != "NO" ]; then
	T=`mktemp /tmp/_motd.XXXXXX`
	if [ $? -eq 0 ]; then
d502 7
a510 3
# Run rc.devfs if present to customize devfs
[ -f /etc/rc.devfs ] && sh /etc/rc.devfs

d517 9
a525 9
# ---- rc.local  ----
#     if [ -f /etc/defaults/rc.conf ]; then
#             . /etc/defaults/rc.conf
#     fi
# 
#     ... additional startup conditionals ...
# ---- rc.local  ---- 
# 
if [ -f /etc/rc.local ]; then
d527 1
a527 1
        sh /etc/rc.local
d533 9
a541 5
if [ "${kern_securelevel_enable}" = "YES" -a "${kern_securelevel}" -ge 0 ]; 
then
	echo 'Raising kernel security level'
	sysctl -w kern.securelevel=${kern_securelevel}
fi
@


1.196
log
@Remove all non-file like things in /var/tmp/vi.recover on reboot.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.195 1999/08/27 23:23:43 peter Exp $
d387 1
a387 1
if [ ! -f /var/msgs/bounds ]; then
@


1.195
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
d346 1
@


1.194
log
@Style clean-up:

	* All variables are now embraced: ${foo}

	* All comparisons against some value now take the form:
	  [ "${foo}" ? "value" ]
	  where ? is a comparison operator

	* All empty string tests now take the form:
	  [ -z "${foo}" ]

	* All non-empty string tests now take the form:
	  [ -n "${foo}" ]

Submitted by:	jkh
@
text
@d2 1
a2 1
#	$Id: rc,v 1.193 1999/08/06 06:22:43 peter Exp $
@


1.193
log
@Perhaps I should have looked at the whole file rather than just the delta.
Use -eq rather than -ne.

Obtained from: OpenBSD (millert, etc/rc rev 1.104)
@
text
@d2 1
a2 1
#	$Id: rc,v 1.192 1999/08/06 06:20:19 peter Exp $
d48 1
a48 1
if [ X$start_vinum = XYES ]; then
d50 2
a51 2
elif [ -n "$vinum_drives" ]; then
	vinum read $vinum_drives
d56 1
a56 1
if [ $1x = autobootx ]; then
d98 1
a98 1
if [ "X$root_rw_mount" != "XNO" ]; then
d109 1
a109 1
if [ "X$early_nfs_mounts" != "XYES" ]; then
d122 3
a124 3
if [ "X$diskless_mount" != "X" ]; then
	if [ -f $diskless_mount ]; then
		sh $diskless_mount
d151 3
a153 3
if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -b /dev/vn0b ]; then
	echo "Adding $swapfile as additional swap."
	vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
d198 1
a198 1
if [ "X${clear_tmp_enable}" = X"YES" ]; then
d220 1
a220 1
if [ "X${syslogd_enable}" = X"YES" ]; then
d236 1
a236 1
if [ "X${dumpdev}" != X"NO" -a -e ${dumpdev} -a -d /var/crash ]; then
d242 1
a242 1
if [ -n "$network_pass1_done" ]; then
d247 1
a247 1
if [ "X${enable_quotas}" = X"YES" ]; then
d250 1
a250 1
    if [ "X${check_quotas}" = X"YES" ]; then
d261 1
a261 1
if [ -n "$network_pass2_done" ]; then
d277 1
a277 1
if [ "X${accounting_enable}" = X"YES" -a -d /var/account ]; then
d288 1
a288 1
	if [ X"`/usr/bin/objformat`" = X"elf" ]; then
d290 3
a292 3
		for i in $ldconfig_paths; do
			if test -d $i; then
				_LDC="${_LDC} $i"
d300 1
a300 1
	if [ X"`sysctl -n hw.machine`" = X"i386" ]; then
d304 3
a306 3
		for i in $ldconfig_paths_aout; do
			if test -d $i; then
				_LDC="${_LDC} $i"
d317 1
a317 1
if [ "X${inetd_enable}" != X"NO" ]; then
d321 1
a321 1
if [ "X${cron_enable}" != X"NO" ]; then
d325 1
a325 1
if [ "X${lpd_enable}" = X"YES" ]; then
d329 1
a329 1
if [ "X${sendmail_enable}" = X"YES" -a -r /etc/sendmail.cf ]; then
d333 1
a333 1
if [ "X${usbd_enable}" = X"YES" ]; then
d347 1
a347 1
if [ "$vibackup" != '/var/tmp/vi.recover/vi.*' ]; then
d349 1
a349 1
	for i in $vibackup; do
d351 1
a351 1
		if test ! -r $i; then
d357 2
a358 2
		if test -x $i -o ! -s $i; then
			rm -f $i
d365 2
a366 2
	if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
		for i in $virecovery; do
d368 1
a368 1
			if test ! -r $i; then
d375 3
a377 3
			recfile=`awk '/^X-vi-recover-path:/{print $2}' < $i`
			if test -n "$recfile" -a -s "$recfile"; then
				sendmail -t < $i
d379 1
a379 1
				rm -f $i
d391 1
a391 1
if [ "X${local_startup}" != X"NO" ]; then
d402 1
a402 1
if [ "X${update_motd}" != X"NO" ]; then
d405 4
a408 4
		uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > $T
		awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> $T
		cmp -s $T /etc/motd || {
			cp $T /etc/motd
d411 1
a411 1
		rm -f $T
d440 1
a440 1
if [ "X${kern_securelevel_enable}" = X"YES" -a "${kern_securelevel}" -ge 0 ]; 
@


1.192
log
@I don't think `customify' is a real word.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.191 1999/08/06 06:16:06 peter Exp $
d404 1
a404 1
	if [ $? -ne 0 ]; then
@


1.191
log
@Don't use /tmp/_motd in the aftermath of the chflags(2) revelations.

Obtained from: OpenBSD (millert etc/rc rev 1.102 and hugh)
@
text
@d2 1
a2 1
#	$Id: rc,v 1.190 1999/08/02 05:42:44 imp Exp $
d415 1
a415 1
# Run rc.devfs if present to customify devfs
@


1.190
log
@Clear flags on psuedo terminals before trying to chmod and chown them.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.189 1999/06/21 15:59:42 sheldonh Exp $
d403 10
a412 7
	T=/tmp/_motd
	rm -rf $T
	uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > $T
	awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> $T
	cp $T /etc/motd
	chmod 644 /etc/motd
	rm -rf $T
@


1.189
log
@Don't allow users to prevent the updating of /etc/motd on machines for
which /tmp is not mounted in MFS, clear_tmp_enable="NO" and
update_motd="YES".

PR:	10005
Submitted by:	Anton Voronin <anton@@urc.ac.ru>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.188 1999/06/01 10:47:53 brian Exp $
d182 1
@


1.188
log
@Ignore the quota.user and quota.group files rather than the
``quotas'' file when cleaning /tmp.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.187 1999/04/02 09:35:34 cracauer Exp $
d403 1
a403 1
	rm -f $T
d408 1
a408 1
	rm -f $T
@


1.187
log
@Break lines to be < 80 chars.

Submitted by:	BDE
@
text
@d2 1
a2 1
#	$Id: rc,v 1.186 1999/04/02 07:15:43 grog Exp $
d203 2
a204 1
		find -d . ! -name . ! -name lost+found ! -name quotas -exec rm -rf -- {} \;)
@


1.186
log
@Add variable start_vinum.  If set to YES, it will start vinum and
automagically find all the partitions.  This is to be preferred to the
somewhat emetic usage of vinum_slices and the equally obnoxious 'vinum
read' command.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.185 1999/04/01 13:30:29 cracauer Exp $
d393 2
a394 1
			[ -x ${script} ] && (set -T ; trap 'exit 1' 2 ; ${script} start)
@


1.185
log
@Use new -T switch to turn on immediate interruptibilty in shell
scripts. Also, the ugly 'echo -n' hack to prevent sh from a wrong
optimization isn't needed anymore.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.184 1999/03/28 20:36:03 imp Exp $
d48 3
a50 1
if [ -n "$vinum_drives" ]; then
@


1.184
log
@Add two features:
    log_in_vain:
	log_in_vain turns on logging for packets to ports for which
	there is no listener.
    rc.sysctl:
	A generic way to set sysctl values.  It reads /etc/syslog.conf
	and sets values based on that.  No /etc/syslog.conf has been
	checked in yet, and I've not added this to the makefile yet
	until I get more feedback.

Reviewed by: -current, -hackers and bde especially
@
text
@d2 1
a2 1
#	$Id: rc,v 1.183 1999/03/17 04:00:04 billf Exp $
d89 1
d391 1
a391 2
			[ -x ${script} ] && \
				(trap 'exit 1' 2 ; ${script} start ; echo -n)
@


1.183
log
@Split check_quotas into check_quotas and enable_quotas

enable_quotas - use quotas on your system
check_quotas - check for violations on startup

By assuming that a system was neat and without violation before it booted
we can skip a long (and at that point needless) process.

Submitted by:	Alex Perel <veers@@disturbed.net>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.182 1999/03/14 20:26:39 des Exp $
d151 5
@


1.182
log
@Fix bogons in previous commit.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.181 1999/03/14 03:20:22 des Exp $
d236 13
a248 6
# Check the quotas (must be after ypbind if using NIS)
if [ "X${check_quotas}" = X"YES" ]; then
	echo -n 'checking quotas:'
	quotacheck -a
	echo ' done.'
	quotaon -a
@


1.181
log
@Chown the pty device nodes back to root:tty.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.180 1999/03/11 16:17:24 jfitz Exp $
d175 1
a175 1
chown root:tty /dev/tty/[pqrsPQRS]*
@


1.180
log
@Add ${lpd_program} and ${portmap_program} as variables in rc.conf, with
suitable defaults pointing to the FreeBSD-shipped versions.  This will allow
for easier integration of third-party replacements for these daemons.
Reviewed by: Several members of -committers
@
text
@d2 1
a2 1
#	$Id: rc,v 1.179 1999/02/13 05:30:49 jkh Exp $
d175 1
@


1.179
log
@Correct various mentions of rc.conf
@
text
@d2 1
a2 1
#	$Id: rc,v 1.178 1999/02/10 18:08:16 jkh Exp $
d308 1
a308 1
	echo -n ' printer';		lpd ${lpd_flags}
@


1.178
log
@Use /etc/defaults/rc.conf everywhere, falling back to /etc/rc.conf
as necessary (for half-assed upgrades).
@
text
@d2 1
a2 1
#	$Id: rc,v 1.177 1999/02/09 17:17:18 dillon Exp $
d11 1
a11 1
# this file, but rather in /etc/rc.conf.  Please check this file
a124 6
# If old file exists, whine until they fix it.
if [ -f /etc/sysconfig ]; then
	echo "Warning: /etc/sysconfig has been replaced by /etc/rc.conf."
	echo "You should switch to /etc/rc.conf ASAP to eliminate this warning."
fi

d283 1
a283 2
		# Default the a.out ldconfig path, in case the system's
		# /etc/rc.conf hasn't been updated.
d398 3
a400 3
# use this file and want to make it programmatic, source /etc/rc.conf in
# /etc/rc.local and add your custom variables to /etc/rc.conf.local, as
# shown below.  Please do not put local extensions into /etc/rc itself. 
d404 2
a405 2
#     if [ -f /etc/rc.conf ]; then
#             . /etc/rc.conf
d407 1
a407 1
#
d409 1
a409 4
# ---- rc.local  ----
#

# Do traditional rc.local file if it exists. 
a410 1

@


1.177
log
@    Revamp rc.diskless.  Split into rc.diskless1 and rc.diskless2.  provide
    more opportunities for overriding.  Clean up /etc/rc ( remove conf_dir,
    remove startup mount special cases, remove other special cases )
@
text
@d2 1
a2 1
#	$Id: rc,v 1.176 1999/02/09 05:20:46 dillon Exp $
d37 3
a39 1
if [ -f /etc/rc.conf ]; then
@


1.176
log
@    Get rid of $conf_dir
@
text
@d2 1
a2 1
#	$Id: rc,v 1.175 1999/01/31 04:28:51 grog Exp $
d26 1
a26 3
# handle read-only NFS mounts, where the various config files
# in /etc often don't apply.   rc.diskless typically sets skip_diskconf=YES
# on return.
d28 1
a28 1
if [ -f /etc/rc.diskless ]; then
d31 1
a31 1
		. /etc/rc.diskless
d42 1
a42 1
if [ "X$skip_diskconf" != "XYES" -a -f /etc/ccd.conf ]; then
d46 1
a46 1
if [ "X$skip_diskconf" != "XYES" -a -n "$vinum_drives" ]; then
d50 1
a50 3
if [ "X$skip_diskconf" != "XYES" ]; then
	swapon -a
fi
d52 1
a52 1
if [ "X$skip_diskconf" != "XYES" -a $1x = autobootx ]; then
d93 1
a93 1
if [ "X$skip_diskconf" != "XYES" ]; then
d95 1
d97 4
a100 4
	if [ $? != 0 ]; then
		echo "Filesystem mount failed, startup aborted"
		exit 1
	fi
d102 1
a102 1
	umount -a >/dev/null 2>&1
d104 1
d106 6
a111 4
	if [ $? != 0 ]; then
		echo "Filesystem mount failed, startup aborted"
		exit 1
	fi
d117 4
a120 2
if [ "X$diskless_mount_func" != "X" ]; then
        $diskless_mount_func
a121 1

@


1.175
log
@Change variable name vinum_slices to vinum_drives to match the variable
we set in rc.conf.

Background: the `vinum read' command has changed.  For a short period
of time, it required the names of the slices on which vinum was
stored.  Now it requires the names of the drives.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.174 1999/01/29 06:18:12 dillon Exp $
d419 1
a419 1
if [ -f $conf_dir/rc.local ]; then
d421 1
a421 1
        sh $conf_dir/rc.local
@


1.174
log
@    If vfs.nfs.diskless_valid does not exist, the conditional fails
    and spews an error message we'd rather not spew.  Fixed.

Submitted by:	Kevin Street <street@@iname.com>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.173 1999/01/26 05:14:36 peter Exp $
d48 2
a49 2
if [ "X$skip_diskconf" != "XYES" -a -n "$vinum_slices" ]; then
	vinum read $vinum_slices
@


1.173
log
@Move reading of rc.conf sooner as requested by Greg.  I'm a tad nervous
about this becase that makes it get run *before* the filesystems are
mounted.  If people have added stuff to their rc.conf or rc.conf.local
that uses stuff outside of /bin and /sbin, this will break.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.172 1999/01/26 04:59:43 peter Exp $
d31 2
a32 1
	if [ `/sbin/sysctl -n vfs.nfs.diskless_valid` != 0 ]; then
@


1.172
log
@The vinum setup tool automatically loads the vinum module if it's needed,
there is no need to duplicate the logic here.

XXX rc.conf needs to be read sooner..
@
text
@d2 1
a2 1
#	$Id: rc,v 1.171 1999/01/25 18:07:25 dillon Exp $
d36 6
d47 1
a47 1
if [ -n "$vinum_slices" ]; then
a110 7
fi

# If there is a global system configuration file, suck it in.
#

if [ -f /etc/rc.conf ]; then
	. /etc/rc.conf
@


1.171
log
@    Finish up /etc/rc adjustments to handle diskless read-only-root booting.
    This will be followed up by rc.diskless and documentation.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.170 1999/01/25 04:40:53 dillon Exp $
d42 1
a42 6
	if [ -r /modules/vinum.ko ]; then	# jkh paranoia
		kldload vinum
		vinum read $vinum_slices
	else
		echo "Can't find /modules/vinum.ko"
	fi
@


1.170
log
@    Introduce rc script for BOOTP 'diskless' boot.  Well, not quite diskless
    since the kernel must be booted from something ( like a floppy ).  This
    script must occur near the beginning of the rc file in order to support
    read-only NFS mounts, which in turn allows all the BOOTP machines to use
    the same / and /usr.

    The companion rc.diskless script is forthcoming.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169 1999/01/20 12:30:13 jkh Exp $
d27 2
a28 2
# in /etc often don't apply.  rc.diskless may terminate the rc script
# early or it may fall through, depending on the case.
d37 1
a37 1
if [ -f /etc/ccd.conf ]; then
d50 3
a52 1
swapon -a
d54 1
a54 1
if [ $1x = autobootx ]; then
d91 13
a103 6
# root must be read/write for NFS diskless before proceeding any further.
mount -u -o rw /
if [ $? != 0 ]; then
	echo "Filesystem mount failed, startup aborted"
	exit 1
fi
d105 5
a109 6
umount -a >/dev/null 2>&1

mount -a -t nonfs
if [ $? != 0 ]; then
	echo "Filesystem mount failed, startup aborted"
	exit 1
d113 2
d119 8
d421 7
a427 4
if [ -f /etc/rc.local ]; then
    echo -n 'starting local daemons:'
    sh /etc/rc.local
    echo '.'
@


1.169
log
@nuke dset from here.

Reminded by:	peter
@
text
@d2 1
a2 1
#	$Id: rc,v 1.168 1999/01/18 03:25:10 grog Exp $
d24 11
@


1.169.2.1
log
@Catch up with changes made in -CURRENT branch.

Egged-on-by:  jkh
@
text
@d2 1
a2 1
#	$Id: rc,v 1.175 1999/01/31 04:28:51 grog Exp $
a24 18
# BOOTP diskless boot.  We have to run the rc file early in order to
# handle read-only NFS mounts, where the various config files
# in /etc often don't apply.   rc.diskless typically sets skip_diskconf=YES
# on return.
#
if [ -f /etc/rc.diskless ]; then
	dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
	if [ ${dlv:=0} != 0 ]; then
		. /etc/rc.diskless
	fi
fi

# If there is a global system configuration file, suck it in.
#
if [ -f /etc/rc.conf ]; then
	. /etc/rc.conf
fi

d26 1
a26 1
if [ "X$skip_diskconf" != "XYES" -a -f /etc/ccd.conf ]; then
d30 7
a36 2
if [ "X$skip_diskconf" != "XYES" -a -n "$vinum_drives" ]; then
	vinum read $vinum_drives
d39 1
a39 3
if [ "X$skip_diskconf" != "XYES" ]; then
	swapon -a
fi
d41 1
a41 1
if [ "X$skip_diskconf" != "XYES" -a $1x = autobootx ]; then
d78 6
a83 3
# root normally must be read/write, but if this is a BOOTP NFS
# diskless boot it does not have to be.
#
d85 6
a90 15
if [ "X$skip_diskconf" != "XYES" ]; then
	mount -u -o rw /

	if [ $? != 0 ]; then
		echo "Filesystem mount failed, startup aborted"
		exit 1
	fi

	umount -a >/dev/null 2>&1

	mount -a -t nonfs
	if [ $? != 0 ]; then
		echo "Filesystem mount failed, startup aborted"
		exit 1
	fi
d93 3
a95 5
# Run custom disk mounting function here
#

if [ "X$diskless_mount_func" != "X" ]; then
        $diskless_mount_func
a97 1

d392 4
a395 7
# Do traditional rc.local file if it exists. 
# 

if [ -f $conf_dir/rc.local ]; then
	echo -n 'starting local daemons:'
        sh $conf_dir/rc.local
	echo '.'
@


1.169.2.2
log
@MFC: Use rc.conf from new location.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.1 1999/01/31 04:35:36 grog Exp $
d39 1
a39 3
if [ -f /etc/defaults/rc.conf ]; then
	. /etc/defaults/rc.conf
elif [ -f /etc/rc.conf ]; then
@


1.169.2.3
log
@    Remove $conf_dir usage from rc
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.2 1999/02/10 18:08:38 jkh Exp $
d421 1
a421 1
if [ -f /etc/rc.local ]; then
d423 1
a423 1
        sh /etc/rc.local
@


1.169.2.4
log
@Update comments to match current affairs.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.3 1999/02/11 22:03:27 dillon Exp $
d404 2
a405 2
# use this file and want to make it programmatic, source /etc/defaults/rc.conf
# in /etc/rc.local and add your custom variables to /etc/rc.conf, as
d410 2
a411 2
#     if [ -f /etc/defaults/rc.conf ]; then
#             . /etc/defaults/rc.conf
d417 4
@


1.169.2.5
log
@MFC: merge changes in both directions.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.4 1999/02/11 23:05:00 jkh Exp $
d11 1
a11 1
# this file, but rather in /etc/defaults/rc.conf.  Please check this file
d124 6
d288 2
a289 1
		# Default the a.out ldconfig path.
@


1.169.2.6
log
@MFC: fix support for diskless in RELENG_3.
Now /etc/rc is the same as in HEAD, rc.diskless[12] are slightly
different using fewer mfs systems (there is still a lot of room
for improvement in both HEAD and RELENG_3)
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.5 1999/02/13 05:31:07 jkh Exp $
d26 3
a28 1
# retarget various config files.
d30 1
a30 1
if [ -f /etc/rc.diskless1 ]; then
d33 1
a33 1
		. /etc/rc.diskless1
d46 1
a46 1
if [ -f /etc/ccd.conf ]; then
d50 1
a50 1
if [ -n "$vinum_drives" ]; then
d54 3
a56 1
swapon -a
d58 1
a58 1
if [ $1x = autobootx ]; then
d99 1
a99 1
if [ "X$root_rw_mount" != "XNO" ]; then
a100 1
fi
d102 4
a105 4
if [ $? != 0 ]; then
	echo "Filesystem mount failed, startup aborted"
	exit 1
fi
d107 1
a107 1
umount -a >/dev/null 2>&1
a108 1
if [ "X$early_nfs_mounts" != "XYES" ]; then
d110 4
a113 6
else
	mount -a
fi
if [ $? != 0 ]; then
	echo "Filesystem mount failed, startup aborted"
	exit 1
d119 2
a120 4
if [ "X$diskless_mount" != "X" ]; then
	if [ -f $diskless_mount ]; then
		sh $diskless_mount
	fi
d122 1
@


1.169.2.7
log
@MFC: Chown the pty device nodes back to root:tty.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.6 1999/03/09 15:01:24 luigi Exp $
a174 1
chown root:tty /dev/tty/[pqrsPQRS]*
@


1.169.2.8
log
@MFC: Fix bogons in previous commit.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.7 1999/03/14 03:21:39 des Exp $
d175 1
a175 1
chown root:wheel /dev/tty[pqrsPQRS]*
@


1.169.2.9
log
@MFC: portmap_program, lpd_program, sendmail comments, check_quota, enable_quotas

	rc.conf 	1.1 -> 1.4
	rc.network 	1.39 -> 1.40
	rc 		1.179 -> 1.180
			1.182 -> 1.183
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.8 1999/03/14 20:30:08 des Exp $
d236 6
a241 13
# Enable/Check the quotas (must be after ypbind if using NIS)
if [ "X${enable_quotas}" = X"YES" ]; then

    # Only check quotas if they have been previously enabled, and requested
    if [ "X${check_quotas}" = X"YES" ]; then
            echo -n 'checking quotas:'
            quotacheck -a
            echo ' done.'
    fi

        echo -n 'enabling quotas:'
        quotaon -a
        echo ' done.'
d309 1
a309 1
	echo -n ' printer';		${lpd_program} ${lpd_flags}
@


1.169.2.10
log
@MFC: Use `sh -T` flag.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.9 1999/03/17 20:04:56 billf Exp $
a88 1
set -T
d386 1
a386 1
				(set -T ; trap 'exit 1' 2 ; ${script} start)
@


1.169.2.11
log
@MFC:  Add variable start_vinum.  If set to YES, it will start vinum and
automagically find all the partitions.  This is to be preferred to the
somewhat emetic usage of vinum_slices and the equally obnoxious 'vinum
read' command.

Prodded-by: Don Lewis <Don.Lewis@@tsc.tdk.com>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.10 1999/04/12 15:55:56 cracauer Exp $
d48 1
a48 3
if [ X$start_vinum = XYES ]; then
	vinum start
elif [ -n "$vinum_drives" ]; then
@


1.169.2.12
log
@MFC: Ignore the quota.user and quota.group files rather than the
     ``quotas'' file when cleaning /tmp.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.11 1999/05/03 08:13:26 grog Exp $
d198 1
a198 2
	    find -d . ! -name . ! -name lost+found ! -name quota.user \
	    ! -name quota.group -exec rm -rf -- {} \;)
@


1.169.2.13
log
@MFC: Don't allow users to prevent the updating of /etc/motd .
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.12 1999/06/01 13:27:37 brian Exp $
d398 1
a398 1
	rm -rf $T
d403 1
a403 1
	rm -rf $T
@


1.169.2.14
log
@MFC: 1.190
@
text
@d2 1
a2 1
#	$Id: rc,v 1.169.2.13 1999/06/21 16:05:14 sheldonh Exp $
a176 1
chflags 0 /dev/tty[pqrsPQRS]*
@


1.169.2.15
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.169.2.16
log
@MFC: fix DoS in boot sequence; implement rc.sysctl; don't use /tmp for
motd creation.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.169.2.15 1999/08/29 14:18:54 peter Exp $
a155 5
# set sysctl variables early as we can
if [ -f /etc/rc.sysctl ]; then
	. /etc/rc.sysctl
fi

a340 1
find /var/tmp/vi.recover ! -type f -a ! -type d -delete
d398 1
a398 1
	T=/var/run/_motd
@


1.169.2.17
log
@MFC: check for /var/msgs before trying to create a file in it.

PR:		bin/13184
Submitted by:	"Stephen J. Roznowski" <sjr@@home.net>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.169.2.16 1999/09/02 08:53:31 imp Exp $
d387 1
a387 1
if [ -d /var/msgs -a  ! -f /var/msgs/bounds ]; then
@


1.169.2.18
log
@MFC: Remove the "vinum_drives" rc.conf knob.
   { rev 1.199 src/etc/rc; rev 1.37 src/etc/defaults/rc.conf }
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.169.2.17 1999/09/12 22:44:16 roberto Exp $
d50 2
@


1.169.2.19
log
@MFC: quote filename variables in vi recovery
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.169.2.18 1999/11/24 03:52:00 jkoshy Exp $
d350 1
a350 1
		if test ! -r "$i"; then
d356 2
a357 2
		if test -x "$i" -o ! -s "$i"; then
			rm -f "$i"
d367 1
a367 1
			if test ! -r "$i"; then
d374 1
a374 1
			recfile=`awk '/^X-vi-recover-path:/{print $2}' < "$i"`
d376 1
a376 1
				sendmail -t < "$i"
d378 1
a378 1
				rm -f "$i"
@


1.169.2.20
log
@MFC: avoid breaking filenames with spaces in to seperate arguments.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.169.2.19 2000/01/05 09:16:48 peter Exp $
d348 1
a348 1
	for i in /var/tmp/vi.recover/vi.*; do
d365 1
a365 1
		for i in /var/tmp/vi.recover/recover.*; do
@


1.169.2.21
log
@MFC: cosmetic change "reboot" -> "boot"
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.169.2.20 2000/01/06 14:29:08 peter Exp $
d55 1
a55 1
	echo Automatic boot in progress...
@


1.168
log
@Only start vinum if vinum_slices variable is non-empty

Reported-by:	roberto
@
text
@d2 1
a2 1
#	$Id: rc,v 1.167 1999/01/17 03:32:07 grog Exp $
d181 2
a182 3
# snapshot any kernel -c changes back to disk
echo 'recording kernel -c changes'
dset -q
@


1.167
log
@Add hooks for starting vinum at boot time.  Set the variable
vinum_slices to the names of all slices (block device) which are under
the control of vinum.  The configuration will be read in from each in
turn, starting with the most recently updated.

Reviewed-by:   jkh
@
text
@d2 1
a2 1
#	$Id: rc,v 1.166 1999/01/11 09:07:38 asami Exp $
d30 1
a30 1
if [ -n $vinum_slices ]; then
@


1.166
log
@Move nologin from /etc to /var/run.  This means one less file that has
to be written to /etc.

The only essential change is in paths.h, so any third-party software
written correctly will pick it up in the next rebuild.

Reviewed by:	the committers list (actually an old version)
@
text
@d2 1
a2 1
#	$Id: rc,v 1.165 1999/01/10 22:06:22 n_hibma Exp $
d28 9
@


1.165
log
@Added starting of usbd
@
text
@d2 1
a2 1
#	$Id: rc,v 1.164 1999/01/06 14:01:52 peter Exp $
a146 2
rm -f /etc/nologin

@


1.164
log
@We load kld's in preference to LKM's, these do not need the root fs to be
read/write to load.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.163 1998/12/12 23:04:20 dillon Exp $
d287 4
@


1.163
log
@Reviewed by:	cvs-current

    Commit changes to rc and rc.local, removing the remaining minimal
    functionality of rc.local into rc and commenting it out of rc.local
    prior to the deletion of rc.local from the CVS tree.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.162 1998/12/11 08:25:12 jb Exp $
d69 1
a69 2
# root must be read/write both for NFS diskless and for VFS LKMs before
# proceeding any further.
@


1.162
log
@Should be sysctl -n. Yesterday wasn't one of my better days. Doh.

Reported by: Ben Smithurst & Makoto Matsushita
@
text
@d2 1
a2 1
#	$Id: rc,v 1.161 1998/12/10 08:06:59 jb Exp $
d355 10
d368 20
a387 2
# Do traditional (but rather obsolete) rc.local file if it exists.
[ -f /etc/rc.local ] && sh /etc/rc.local
@


1.161
log
@Add a test for hw.machine == i386 before trying to run ldconfig for
legacy aout support.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.160 1998/10/09 17:11:14 des Exp $
d256 1
a256 1
	if [ X"`sysctl hw.machine`" = X"i386" ]; then
@


1.160
log
@Hand me the pointy hat, and make it big.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.159 1998/10/08 18:47:29 des Exp $
d255 14
a268 11
	# Default the a.out ldconfig path, in case the system's
	# /etc/rc.conf hasn't been updated.
	: ${ldconfig_paths_aout=${ldconfig_paths}}
	_LDC=/usr/lib/aout
	for i in $ldconfig_paths_aout; do
		if test -d $i; then
			_LDC="${_LDC} $i"
		fi
	done
	echo 'setting a.out ldconfig path:' ${_LDC}
	ldconfig -aout ${_LDC}
@


1.159
log
@Remove all references to tickadj(8) from rc, rc.conf and rc.conf.5.

Disable building tickadj(8) by removing util from SUBDIR in the xntpd
Makefile. Note that the sources are still there and tickadj can still
be built and installed by doing:

# cd /usr/src/usr.sbin/xntpd/util
# make all install

There are enough references to tickadj in e.g. the xntpd documentation
(not to mention the sysctl variables it uses etc.) that I don't feel
up to implementing the final solution right now.

Kinda-approved-by:	phk
@
text
@d1 2
a2 2
'#!/bin/sh
#	$Id: rc,v 1.158 1998/09/30 14:44:57 cracauer Exp $
@


1.158
log
@Put guard shells around stuff started from $local_startup. If you type
SIGINT (C-c), you'll get control passed to the next script even if
the current one blocks signals. The child is not killed, though.
@
text
@d1 2
a2 2
#!/bin/sh
#	$Id: rc,v 1.157 1998/09/16 22:42:56 brian Exp $
a192 4
fi

if [ "X${tickadj_enable}" = X"YES" ]; then
	echo -n ' tickadj';	tickadj ${tickadj_flags--Aq}
@


1.157
log
@Spaces -> tabs, don't use touch before it's available
Pointed out by: bde
@
text
@d2 1
a2 1
#	$Id: rc,v 1.156 1998/09/16 05:42:37 jdp Exp $
d349 2
a350 1
			[ -x ${script} ] && ${script} start
@


1.156
log
@Fix up the boot-time ldconfig handling to deal with dual object
file formats.  I have added a new rc.conf variable ${ldconfig_paths_aout}
which is like ${ldconfig_paths}, but only for a.out shared libraries.

On a "standard" ELF system, the ELF ldconfig path is taken from
${ldconfig_paths}, while the a.out ldconfig path is taken from
${ldconfig_paths_aout}.

On a not-yet-converted a.out system, only the a.out ldconfig path
is set, and it is taken from ${ldconfig_paths_aout}.  If that
variable is unset, /etc/rc defaults it to the value of ${ldconfig_paths},
on the assumption that the system's "/etc/rc.conf" file hasn't been
updated.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.155 1998/09/14 09:14:46 sos Exp $
d87 1
a87 1
    . /etc/rc.conf
d99 10
a108 10
  if [ ! -f /var/run/clean_var ]; then
    rm -rf /var/run/*
    rm -f /var/spool/lock/*
    rm -rf /var/spool/uucp/.Temp/*
    # Keep a copy of the boot messages around
    dmesg >/var/run/dmesg.boot
    # And an initial utmp file
    (cd /var/run && cp /dev/null utmp && chmod 644 utmp; )
    touch /var/run/clean_var
  fi
d112 4
a115 4
  # network_pass1() *may* end up writing stuff to /var - we don't want to
  # remove it immediately afterwards - *nor* to we want to fail to clean
  # an nfs-mounted /var.
  clean_var
d167 1
a167 1
	    find -d . ! -name . ! -name lost+found ! -name quotas -exec rm -rf -- {} \;)
d210 1
a210 1
    network_pass2
d222 1
a222 1
    network_pass3
@


1.155
log
@Make /dev/vga a softlink to /dev/ttyv0 under DEVFS using /etc/rc.devfs

Remove the hack from syscons that added a /dev/vga node in DEVFS
it broke root acces on ttyv0 because dev_mkdb screwed up.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.154 1998/09/09 22:27:21 jraynard Exp $
d248 14
d263 1
a263 1
	for i in $ldconfig_paths; do
@


1.154
log
@Disable kernel_secure_level unless explicitly set in rc.conf.  Previously,
it was enabled unless explicitly unset, creating a pitfall for people
like me who upgraded /etc/rc without upgrading /etc/rc.conf.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.153 1998/09/07 17:18:36 cracauer Exp $
d340 3
@


1.153
log
@Remove X11 lock files at boot time even if $clear_tmp_enable is not set.
PR:		conf/7366
Submitted by:	Thomas David Rivers rivers@@dignus.com
@
text
@d2 1
a2 1
#	$Id: rc,v 1.152 1998/09/05 04:27:35 jdp Exp $
d346 1
a346 1
if [ "X${kern_securelevel_enable}" != X"NO" -a "${kern_securelevel}" -ge 0 ]; 
@


1.152
log
@Explicitly pass the "-aout" option to ldconfig, until I've had a
chance to work out a better scheme to handle the separate
invocations necessary for a.out and ELF.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.151 1998/08/24 07:11:48 gpalmer Exp $
a168 3
	# Also remove X lock files since it will prevent you from
	# restarting X11 after a system crash.
	rm -f /tmp/.X*-lock /tmp/.X11-unix/*
d170 4
@


1.151
log
@Don't try to run ldconfig if it doesn't exist. Useful for elf platforms.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.150 1998/08/20 11:22:52 phk Exp $
d253 2
a254 2
	echo 'setting ldconfig path:' ${_LDC}
	ldconfig ${_LDC}
@


1.150
log
@Fix my blunder in my previous commit here.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.149 1998/08/14 06:49:05 phk Exp $
d246 10
a255 8
_LDC=/usr/lib/aout
for i in $ldconfig_paths; do
	if test -d $i; then
		_LDC="${_LDC} $i"
	fi
done
echo 'setting ldconfig path:' ${_LDC}
ldconfig ${_LDC}
@


1.149
log
@Add "Mounting NFS file systems" progress indicator

PR:		7605
Reviewed by:	phk
Submitted by	Nick Hibma <nick.hibma@@jrc.it>:
@
text
@d2 1
a2 1
#	$Id: rc,v 1.148 1998/08/10 19:53:50 brian Exp $
a78 1
echo -n "Mounting NFS file systems"
a79 1
echo .
d140 1
d142 1
@


1.148
log
@Don't blat /var/run and /var/spool/lock *after* network_pass1()
unless /var is nfs-mounted.
This was removing ppps device lock (when ppp's started in
/etc/start_if.tun0 in -ddial or -dedicated mode) and allowing
other programs (such as mgetty) to confuse ppp by playing with
the modem while ppp's using it.

People that nfs-mount /var had better not start ppp in this
way....
@
text
@d2 1
a2 1
#	$Id: rc,v 1.147 1998/07/28 01:15:12 nectar Exp $
d79 1
d81 1
@


1.147
log
@make a bounds file for msgs(1) if there isn't one already
PR:		bin/3023
Reviewed by:	jkh@@FreeBSD.ORG
@
text
@d2 1
a2 1
#	$Id: rc,v 1.146 1998/06/22 06:34:12 jkoshy Exp $
d98 19
a116 4
rm -rf /var/run/*

# Keep a copy of the boot messages around
dmesg > /var/run/dmesg.boot
d147 3
a149 3
rm -f /var/spool/lock/*
rm -rf /var/spool/uucp/.Temp/*
(cd /var/run && { cp /dev/null utmp; chmod 644 utmp; })
@


1.146
log
@Add rc.conf option to set kernel security level and modify "/etc/rc" to
use this.

Requested by: max, andreas

Note: This change just provides a convenient way to exercise existing
functionality.  Whether `kern.securelevel' is effective in increasing
system security is another issue, and one that has been well thrashed
out in the lists.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.145 1998/06/02 11:02:16 phk Exp $
d303 5
@


1.145
log
@Cut through the discussions and settle the issue:  Everything in /var/run
is blown away at boot.  If sudo or other programs needs directories, they
had better make them in /usr/local/etc/rc.d/mumble.sh

PR:		4138 5619 6793
@
text
@d2 1
a2 1
#	$Id: rc,v 1.144 1998/05/26 20:12:45 sos Exp $
d318 8
@


1.144
log
@ELF preparation step 2:

Move a.out libraries to /usr/lib/aout to make space for ELF libs.
Make rtld usr /usr/lib/aout as default library path.
Make ldconfig reject /usr/lib as an a.out library path.
Fix various Makefiles for LIBDIR!=/usr/lib breakage.

This will after a make world & reboot give a system that no
longer uses /usr/lib/*, infact one could remove all the old
libraries there, they are not used anymore.

We are getting close to an ELF make world, but I'll let this
all settle for a week or two...
@
text
@d2 1
a2 1
#	$Id: rc,v 1.143 1998/01/08 17:08:22 joerg Exp $
d98 1
a98 1
rm -f /var/run/*
@


1.143
log
@Start syslogd before savecore, so savecore's messages will be logged
properly.  Only users of 4 MB machines might not want it this way (to
prevent accidentally clobbering the coredump), but they are somewhat
in the minority these days.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.142 1997/12/27 19:46:53 steve Exp $
d229 1
a229 1
_LDC=/usr/lib
@


1.142
log
@Add a ldconfig_paths variable that specifies the shared library paths
to be given to ldconfig(8).

PR:		5178
Submitted by:	Evan Champion <evanc@@synapse.net>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.141 1997/12/09 10:06:49 danny Exp $
a156 9
# enable dumpdev so that savecore can see it
# /var/crash should be a directory or a symbolic link
# to the crash directory if core dumps are to be saved.
if [ "X${dumpdev}" != X"NO" -a -e ${dumpdev} -a -d /var/crash ]; then
	dumpon ${dumpdev}
	echo -n checking for core dump...
	savecore /var/crash
fi

d181 9
@


1.141
log
@Back out last commit re dmesg.boot
@
text
@d2 1
a2 1
#	$Id: rc,v 1.140 1997/12/09 07:22:04 danny Exp $
d230 5
a234 3
if [ -d /usr/lib/compat ]; then _LDC="${_LDC} /usr/lib/compat" ; fi
if [ -d /usr/X11R6/lib ]; then _LDC="${_LDC} /usr/X11R6/lib" ; fi
if [ -d /usr/local/lib ]; then _LDC="${_LDC} /usr/local/lib" ; fi
@


1.140
log
@Make rc record boottime dmesg to /var/log/dmesg.boot, so the data
is preserved after it scrolls out of the dmesg buffer.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.139 1997/11/16 12:52:16 steve Exp $
a315 4

# Record dmesg buffer at boot
dmesg > /var/log/dmesg.boot
chmod 400 /var/log/dmesg.boot
@


1.139
log
@Resurrect a modified version of the /tmp clearing code from rev 1.119.
Enable this by setting clear_tmp_enable in rc.conf to YES.  Beware
there can be serious side-effects of enabling this, so use at you own
risk.

PR:		misc/4982, misc/5054
@
text
@d2 1
a2 1
#	$Id: rc,v 1.138 1997/09/21 16:09:47 joerg Exp $
d316 4
@


1.138
log
@Unspam rev 1.114 that got spammed when someone commited the rc.conf
changes: drop `savecore_enable' now that our savecore obeyes the
minfree file.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.137 1997/09/13 21:07:12 brian Exp $
d135 21
@


1.137
log
@Change the not-specified-default for inetd & cron
to "enabled".  This will avoid breaking things for
idiots like me who update /etc/rc without paying
attention and updating rc.conf too.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.136 1997/09/13 09:29:21 brian Exp $
a136 4
if [ "X${dumpdev}" != X"NO" -a -e ${dumpdev} ]; then
	dumpon ${dumpdev}
fi

d139 2
a140 1
if [ "X${savecore_enable}" = X"YES" -a -d /var/crash ]; then
@


1.136
log
@Don't redirect "mount -t -o nfs" to null
@
text
@d2 1
a2 1
#	$Id: rc,v 1.135 1997/08/17 15:02:34 joerg Exp $
d221 1
a221 1
if [ "X${inetd_enable}" = X"YES" ]; then
d225 1
a225 1
if [ "X${cron_enable}" = X"YES" ]; then
@


1.135
log
@Ooops.  Wrong branch, back out previous commit.
@
text
@d2 1
a2 1
#	$Id$
d125 1
a125 1
mount -a -t nfs >/dev/null 2>&1
@


1.134
log
@MFC: rev 1.125, remove old PID files at startup
@
text
@a133 1
rm -f /var/run/*.pid
@


1.133
log
@Back out ld.so.conf change until the question is resolved.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.131 1997/06/25 11:48:47 pst Exp $
d134 1
@


1.132
log
@Use /etc/ld.so.conf as a library path override, if it exists.
Submitted by:	Hans Zuidam <hans@@brandinnovators.com>
@
text
@d209 6
a214 12
# If we have an ld.so.conf file, let it do the job.  It is expected
# to contain /usr/lib and other important system library locations
# as well as those local to the site!
if [ -f /etc/ld.so.conf ]; then
	_LDC=/etc/ld.so.conf
else
	# Leave /usr/lib first when adding entries or you may come to grief.
	_LDC=/usr/lib
	if [ -d /usr/lib/compat ]; then _LDC="${_LDC} /usr/lib/compat" ; fi
	if [ -d /usr/X11R6/lib ]; then _LDC="${_LDC} /usr/X11R6/lib" ; fi
	if [ -d /usr/local/lib ]; then _LDC="${_LDC} /usr/local/lib" ; fi
fi
d287 1
a287 1
	echo -n 'Local package startup:'
@


1.131
log
@Execute rc.local in a subshell instead of sourcing it.

Requested by:	dima
@
text
@d2 1
a2 1
#	$Id: rc,v 1.130 1997/06/25 03:12:12 dima Exp $
d209 12
a220 6
# Make shared lib searching a little faster.  Leave /usr/lib first if you
# add your own entries or you may come to grief.
_LDC=/usr/lib
if [ -d /usr/lib/compat ]; then _LDC="${_LDC} /usr/lib/compat" ; fi
if [ -d /usr/X11R6/lib ]; then _LDC="${_LDC} /usr/X11R6/lib" ; fi
if [ -d /usr/local/lib ]; then _LDC="${_LDC} /usr/local/lib" ; fi
@


1.130
log
@sh /etc/rc.local -> . /etc/rc.local
@
text
@d2 1
a2 1
#	$Id: rc,v 1.129 1997/06/18 16:01:18 pst Exp $
d297 1
a297 1
[ -f /etc/rc.local ] && . /etc/rc.local
@


1.129
log
@Add cron_enable and inetd_enable flags to rc.conf.
WARNING: don't update rc and forget to update rc.conf, or you won't be
able to telnet back into your box after a reboot.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.128 1997/06/04 20:02:57 ache Exp $
d297 1
a297 1
[ -f /etc/rc.local ] && sh /etc/rc.local
@


1.128
log
@Remove /var/run/* now instead of *.pid
@
text
@d2 1
a2 1
#	$Id: rc,v 1.127 1997/06/04 19:20:04 ache Exp $
d221 7
a227 2
echo -n ' inetd';		inetd ${inetd_flags}
echo -n ' cron';		cron
@


1.127
log
@Restore /var/run/*.pid cleaning, gated already moved off the way
and innd store its .pid inside its own directories
@
text
@d2 1
a2 1
#	$Id: rc,v 1.125 1997/06/01 23:33:00 ache Exp $
d98 2
a102 1

a133 1
rm -f /var/run/*.pid
@


1.126
log
@Back out /var/run/*.pid cleaning since some programms (like innd)
use .pid to detect crash
@
text
@d133 1
@


1.125
log
@Add rm -f /var/run/*.pid to prevent random process killing due to
picking old .pid file
@
text
@d2 1
a2 1
#	$Id: rc,v 1.124 1997/05/19 07:46:48 jkh Exp $
a132 1
rm -f /var/run/*.pid
@


1.124
log
@Neaten up some things which were inconsistent, add a few more flags
to things which need them, general cleanup.
Submitted by:	Brian Somers <brian@@awfulhak.org>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.123 1997/05/07 12:35:03 jkh Exp $
d133 1
@


1.123
log
@Use full path to sendmail for security reasons.
Submitted by:	Ollivier Robert <roberto@@keltia.freenix.fr>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.122 1997/05/05 07:08:30 jkh Exp $
d224 1
a224 1
	echo -n ' printer';		lpd
@


1.122
log
@Add inetd_flags and way of passing ipfw a configuration file
(if firewall = "somefilename").

Fix typo fixes and URLs which were accidently nuked out of this
file (submitted by: soil@@quick.net via PR#3501).

Submitted by:	"Danny J. Zerkel" <dzerkel@@phofarm.com>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.121 1997/05/04 22:33:17 andreas Exp $
d228 1
a228 1
	echo -n ' sendmail';	sendmail ${sendmail_flags}
@


1.121
log
@re-enabled: . /etc/rc.${arch}
PR:
Reviewed by:	bruce
Submitted by:
Obtained from:
@
text
@d2 1
a2 1
#	$Id: rc,v 1.120 1997/05/04 12:50:33 andreas Exp $
d220 1
a220 1
echo -n ' inetd';		inetd
@


1.120
log
@Fixed sourcing of /etc/etc.${arch}/rc.${arch} on startup.
PR:
Reviewed by:
Submitted by:
Obtained from:
@
text
@d2 1
a2 1
#	$Id: rc,v 1.119 1997/05/03 11:22:16 jkh Exp $
d235 3
a237 3
if [ -f /etc/etc.${arch}/rc.${arch} ]; then
        . /etc/etc.${arch}/rc.${arch}
fi 
@


1.119
log
@Update the etc world from RELENG_2_2 which is now more up-to-date
(gotta get myself -current again, this is a drag).

Also-fixes-problems-noted-by: Wolfgang Helbig & Joerg Wunsch
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.11 1997/05/01 06:01:35 jkh Exp $
d235 3
a237 3
if [ -f /etc/rc.${arch} ]; then
	. /etc/rc.${arch}
fi
@


1.118
log
@Clean up the output a bit.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.117 1997/04/27 03:59:13 jkh Exp $
a134 24
#
# Clearing /tmp at boot-time is essentially stupid, but seems to have
# a long tradition.  It doesn't help in any way for long-living systems,
# and it might accidentally clobber files you would rather like to have
# preserved after a crash (if not using mfs /tmp anyway).
#
# See also the commented out example of another cleanup policy in
# /etc/daily.
#
echo clearing /tmp

# prune quickly with one rm, then use find to clean up /tmp/[lq]*
# (not needed with mfs /tmp, but doesn't hurt there...)
(cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
    find -d . ! -name . ! -name lost+found ! -name quotas -exec rm -rf -- {} \;)

# The above is even more stupid since it prevents you from restarting
# X11 after a system crash.  If you disable the above, make sure to
# uncomment the line below.
#
# clean up leftover X lock files and local connection sockets
#rm -f /tmp/.X*-lock /tmp/.X11-unix/*


d136 1
a136 1
if [ "X${dumpdev}" != X"NO" ]; then
d142 1
a142 1
if [ -d /var/crash ]; then
d155 1
a155 3
# If syslogdflags == NO, syslog isn't run
if [ "X${syslogdflags}" != X"NO" ] ; then

d168 1
a168 1
	echo -n ' tickadj'; tickadj ${tickadj_flags--Aq}
d203 1
a203 1
		touch /var/account/acct && chmod 600 /var/account/acct
@


1.117
log
@Bring in rc file changes from -current.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.116 1997/04/09 20:14:59 guido Exp $
d173 1
a173 1
/sbin/dset -q
d175 1
a178 2
echo -n starting system daemons:

d190 5
a194 1
	echo 'Starting syslogd.';		syslogd ${syslogd_flags}
d196 1
d245 1
a245 1
echo -n standard daemons:
@


1.116
log
@Make a sysconfig variable controlling if teh kernel should accept
nfs requests from non-privileged ports.

Change mountd such that it does never set this variable, but only clears
it when run with -n. Also document this in the man page.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.115 1997/04/01 01:00:34 pst Exp $
d11 1
a11 1
# this file, but rather in /etc/sysconfig.  Please check this file
d26 1
a26 2
if [ -f /etc/ccd.conf ]
then
d32 1
a32 2
if [ $1x = autobootx ]
then
d85 11
d99 1
a99 1
/sbin/dmesg > /var/run/dmesg.boot
a100 4
# If there is a global system configuration file, suck it in.
if [ -f /etc/sysconfig ]; then
	. /etc/sysconfig
fi
d105 1
a105 1
	/usr/sbin/vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
d118 4
a121 3
# start up the network
if [ -f /etc/netstart ]; then
	sh /etc/netstart
d191 1
a191 25
	echo ' syslogd.';		syslogd ${syslogdflags}
fi

echo -n starting early network daemons:

# $namedflags is imported from /etc/sysconfig
if [ "X${namedflags}" != X"NO" ]; then
	echo -n ' named';		named $namedflags
fi

# $ntpdate and $xntpdflags are imported from /etc/sysconfig.
# If $ntpdate != NO, run ntpdate $ntpdate to set the date correctly.
# If $xntpdflags != NO, start xntpd.
if [ "X${ntpdate}" != X"NO" -o "X${xntpdflags}" != X"NO" ]; then
	if [ "X${tickadjflags}" != X"NO" ]; then
		echo -n ' tickadj';	tickadj ${tickadjflags--Aq}
	fi

	if [ "X${ntpdate}" != X"NO" ]; then
		echo -n ' ntpdate';	ntpdate ${ntpdate} >/dev/null 2>&1
	fi

	if [ "X${xntpdflags}" != X"NO" ]; then
		echo -n ' xntpd';	xntpd ${xntpdflags}
	fi
d194 2
a195 4
# $timedflags is imported from /etc/sysconfig;
# if $timedflags == NO, timed isn't run.
if [ "X${timedflags}" != X"NO" ]; then
	echo -n ' timed';		timed ${timedflags}
a197 30
# Portmapper should always be run, to provide RPC services for inetd.
# if $portmapflags == NO, portmap isn't run.
if [ -x /usr/sbin/portmap -a "X${portmapflags}" != X"NO" ]; then
	echo -n ' portmap';		portmap ${portmapflags}
fi

# Start ypserv if we're an NIS server.
# Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server.
if [ "X${nis_serverflags}" != X"NO" ]; then
	echo -n ' ypserv'; ypserv ${nis_serverflags}

	if [ "X${ypxfrdflags}" != X"NO" ]; then
		echo -n ' rpc.ypxfrd'; rpc.ypxfrd ${ypxfrdflags}
	fi

	if [ "X${yppasswddflags}" != X"NO" ]; then
		echo -n ' rpc.yppasswdd'; rpc.yppasswdd ${yppasswddflags}
	fi
fi

# Start ypbind if we're an NIS client
if [ "X${nis_clientflags}" != X"NO" ]; then
	echo -n ' ypbind'; ypbind ${nis_clientflags}
	if [ "X${nis_ypsetflags}" != X"NO" ]; then
		echo -n ' ypset'; ypset ${nis_ypsetflags}
	fi
fi

echo '.'

d206 2
a207 17
echo -n starting other network daemons:

if [ "X${nfs_server}" = X"YES" -a -r /etc/exports ]; then
	echo -n ' mountd'
	if [ "X${weak_mountd_authentication}" = X"YES" ]; then
		mountd -n
	else
		mountd
	fi
	if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
		sysctl -w vfs.nfs.nfs_privport=1
	fi
	echo -n ' nfsd';		nfsd -u -t 4
# Warning: rpc.lockd is broken.
# Only uncomment this line if the consequences are fully understood.
#	echo -n ' rpc.lockd';		rpc.lockd
	echo -n ' rpc.statd';		rpc.statd
a209 28
if [ "X${nfs_client}" = X"YES" ]; then
	echo -n ' nfsiod';		nfsiod -n 4
fi

if [ "X${amdflags}" != X"NO" ]; then
	echo -n ' amd'
	amd -p ${amdflags} > /var/run/amd.pid
fi

# $rwhod is imported from /etc/sysconfig;
# if $rwhod is set to YES, rwhod is run.
if [ "X${rwhod}" = X"YES" ]; then
	echo -n ' rwhod';	rwhod
fi

# Kerberos runs ONLY on the Kerberos server machine
if [ "X${kerberos_server}" = X"YES" ]; then
	echo -n ' kerberos';	kerberos >> /var/log/kerberos.log &
	echo -n ' kadmind'; \
		(sleep 20; kadmind -n >/dev/null 2>&1 &) &
fi

# IP multicast routing daemon
if [ "X${mrouted}" != X"NO" -a -x /usr/sbin/mrouted ]; then
	echo -n ' mrouted'; mrouted ${mrouted}
fi

echo '.'
d222 1
a222 1
if [ "X${accounting}" = X"YES" -a -d /var/account ]; then
d232 6
a237 9
if [ -x /sbin/ldconfig ]; then
	_LDC=/usr/lib
	if [ -d /usr/lib/compat ]; then _LDC="${_LDC} /usr/lib/compat" ; fi
	if [ -d /usr/X11R6/lib ]; then _LDC="${_LDC} /usr/X11R6/lib" ; fi
	if [ -d /usr/X386/lib ]; then _LDC="${_LDC} /usr/X386/lib" ; fi
	if [ -d /usr/local/lib ]; then _LDC="${_LDC} /usr/local/lib" ; fi
	echo 'setting ldconfig path:' ${_LDC}
	ldconfig ${_LDC}
fi
d245 1
a245 1
if [ "X${lpd}" != X"NO" -a -x /usr/sbin/lpd ]; then
d249 2
a250 4
# $sendmail_flags is imported from /etc/sysconfig;
# if $sendmail_flags is something other than NO, sendmail is run.
if [ "X${sendmail_flags}" != X"NO" -a -r /etc/sendmail.cf ]; then
	echo -n ' sendmail';            /usr/sbin/sendmail ${sendmail_flags}
@


1.115
log
@Add portmapflags and syslogd flags.
Reviewed by:	jkh
@
text
@d2 1
a2 1
#	$Id: rc,v 1.114 1997/03/16 15:26:32 joerg Exp $
d264 3
@


1.114
log
@Having two knobs until you get a kernel core dump saved is silly.
Leave dumpdev, but kill the savecore variable.  Thus, it's still off
by default, but all you need is enabling dumpdev now.

phk's old argument that savecore might inadvertendly fill up the disk
no longer counts, savecore now correctly obeyes a `minfree' file, and
we ship our systems with such a file that even has a reasonable
default.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.113 1997/02/23 09:20:46 peter Exp $
d174 12
a185 5
# Transitional symlink (for the next couple of years :) until all
# binaries had a chance to move towards /var/run/log.
if [ ! -h /dev/log ] ; then
	# might complain for r/o root f/s
	ln -sf /var/run/log /dev/log
a186 2
rm -f /var/run/log
echo ' syslogd.';			syslogd
d215 1
a215 1
	echo -n ' timed'; timed $timedflags
d219 3
a221 2
if [ -x /usr/sbin/portmap ]; then
	echo -n ' portmap';		portmap
@


1.113
log
@Revert $FreeBSD$ to $Id$
@
text
@d2 1
a2 1
#	$Id$
d160 1
a160 1
if [ "X${savecore}" = X"YES" -a -d /var/crash ]; then
@


1.112
log
@Make sure newly created /var/account/acct file is 0600 mode.
@
text
@d2 1
a2 1
#	$FreeBSD$
@


1.111
log
@Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
@
text
@d309 1
a309 1
		touch /var/account/acct
@


1.110
log
@Put dmesg.boot in /var/run instead of /var/tmp

Suggested by: joerg & peter
@
text
@d2 1
a2 1
#	$Id: rc,v 1.109 1997/01/02 16:28:33 phk Exp $
@


1.109
log
@Now that uptimes run into months on a regular basis, I often find myself
wondering what the hw-config of a machine is, and the logs have been
rotated many times since reboot already.

Added:
	/sbin/dmesg > /var/tmp/dmesg.boot
to /etc/rc

2.2 candidate
@
text
@d2 1
a2 1
#	$Id: rc,v 1.108 1996/12/23 00:32:15 joerg Exp $
d90 1
a90 1
/sbin/dmesg > /var/tmp/dmesg.boot
@


1.108
log
@Extend the set of ptys to chmod at boot time.

Closes PR # conf/1957: not all perms of ptys...

Submitted by:	gurney_j@@efn.org (John-Mark Gurney)
@
text
@d2 1
a2 1
#	$Id: rc,v 1.107 1996/12/19 18:06:35 joerg Exp $
d88 3
@


1.107
log
@Add /usr/local/sbin to the rc $PATH.  Things like GateD are located there.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.106 1996/11/13 19:04:31 adam Exp $
d118 1
a118 1
chmod 666 /dev/tty[pqrs]*
@


1.106
log
@start rpc.statd for nfs_server case.
add warning and commented out line for rpc.lockd
@
text
@d2 1
a2 1
#	$Id: rc,v 1.105 1996/11/03 14:41:58 joerg Exp $
d22 1
a22 1
PATH=/sbin:/bin:/usr/sbin:/usr/bin
@


1.105
log
@/dev/vn0b is supposed to be a block device, so don't test(1) whether
it's a plain file.

Submitted by:	brian@@awfulhak.demon.co.uk (Brian Somers)
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104 1996/11/01 09:45:51 peter Exp $
d257 4
@


1.104
log
@Update to use the recommended recovery procedure from nvi-1.76.
This is a lot more robust and handles errors a lot better.  It also cleans
up stray, hopeless, or unmodified files rather than leaving them there
forever.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.103 1996/10/28 08:28:02 joerg Exp $
d95 1
a95 1
if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -f /dev/vn0b ]; then
@


1.104.2.1
log
@Merge from -current.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.105 1996/11/03 14:41:58 joerg Exp $
d95 1
a95 1
if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -b /dev/vn0b ]; then
@


1.104.2.2
log
@YAMFC
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.1 1996/11/04 10:05:59 phk Exp $
a256 4
# Warning: rpc.lockd is broken.
# Only uncomment this line if the consequences are fully understood.
#	echo -n ' rpc.lockd';		rpc.lockd
	echo -n ' rpc.statd';		rpc.statd
@


1.104.2.3
log
@Merge rev 1.107: add /usr/local/sbin to $PATH.
@
text
@d2 1
a2 1
#	$Id$
d22 1
a22 1
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
@


1.104.2.4
log
@Merge the fix from rev 1.108: consider all ptys.
@
text
@d118 1
a118 1
chmod 666 /dev/tty[pqrsPQRS]*
@


1.104.2.5
log
@YAMFC (keep dmesg.boot in /var/run)
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.4 1996/12/23 00:36:58 joerg Exp $
a87 3

# Keep a copy of the boot messages around
/sbin/dmesg > /var/run/dmesg.boot
@


1.104.2.6
log
@Add portmapflags and syslogdflags
Reviewed by:	jkh
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.5 1997/01/03 08:18:58 phk Exp $
d174 5
a178 12
# If syslogdflags == NO, syslog isn't run
if [ "X${syslogdflags}" != X"NO" ] ; then

	# Transitional symlink (for the next couple of years :) until all
	# binaries had a chance to move towards /var/run/log.
	if [ ! -h /dev/log ] ; then
		# might complain for r/o root f/s
		ln -sf /var/run/log /dev/log
	fi

	rm -f /var/run/log
	echo ' syslogd.';		syslogd ${syslogdflags}
d180 2
d210 1
a210 1
	echo -n ' timed';		timed ${timedflags}
d214 2
a215 3
# if $portmapflags == NO, portmap isn't run.
if [ -x /usr/sbin/portmap -a "X${portmapflags}" != X"NO" ]; then
	echo -n ' portmap';		portmap ${portmapflags}
@


1.104.2.7
log
@From current: Fix mountd so the privport stuff is backwards compatible
with older systems. Add sysconfig variable to control the privport
stuff.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.6 1997/04/01 00:59:48 pst Exp $
a263 3
	fi
	if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
		sysctl -w vfs.nfs.nfs_privport=1
@


1.104.2.8
log
@Bring in rc reorganizational changes.  I'm bringing them into 2.2
first rather than 3.0 because, ironically, I have every confidence that
they run in 2.2 but not in 3.0 yet.  3.0 commits will follow just as I've
finished an inventory for any new knobs in -current which need accomodation.
In any case, it's good to get them into 2.2 early because there is going
to be a doc hit for this (all the references to sysconfig) and I'd just
as soon start getting people used to the new files ASAP rather than
prolonging the pain any more than necessary.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.7 1997/04/09 20:30:58 guido Exp $
d11 1
a11 1
# this file, but rather in /etc/rc.conf.  Please check this file
d26 2
a27 1
if [ -f /etc/ccd.conf ]; then
d33 2
a34 1
if [ $1x = autobootx ]; then
a86 11
# If there is a global system configuration file, suck it in.
if [ -f /etc/rc.conf ]; then
    . /etc/rc.conf
fi

# If old file exists, whine until they fix it.
if [ -f /etc/sysconfig ]; then
	echo "Warning: /etc/sysconfig has been replaced by /etc/rc.conf."
	echo "You should switch to /etc/rc.conf ASAP to eliminate this warning."
fi

d90 1
a90 1
dmesg > /var/run/dmesg.boot
d92 4
d100 1
a100 1
	vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
d113 3
a115 4
# start up the initial network configuration.
if [ -f /etc/rc.network ]; then
	. /etc/rc.network	# We only need to do this once.
	network_pass1
d129 24
d154 1
a154 1
if [ "X${dumpdev}" != X"NO" -a -e ${dumpdev} ]; then
d160 1
a160 1
if [ "X${savecore_enable}" = X"YES" -a -d /var/crash ]; then
d167 1
a167 1
dset -q
d172 5
a176 1
if [ "X${syslogd_enable}" = X"YES" ]; then
d185 51
a235 1
	echo 'Starting syslogd.';		syslogd ${syslogd_flags}
d238 6
a243 2
if [ -n "$network_pass1_done" ]; then
    network_pass2
d246 2
d256 26
a281 2
if [ -n "$network_pass2_done" ]; then
    network_pass3
d284 19
d315 1
a315 1
if [ "X${accounting_enable}" = X"YES" -a -d /var/account ]; then
d325 9
a333 6
_LDC=/usr/lib
if [ -d /usr/lib/compat ]; then _LDC="${_LDC} /usr/lib/compat" ; fi
if [ -d /usr/X11R6/lib ]; then _LDC="${_LDC} /usr/X11R6/lib" ; fi
if [ -d /usr/local/lib ]; then _LDC="${_LDC} /usr/local/lib" ; fi
echo 'setting ldconfig path:' ${_LDC}
ldconfig ${_LDC}
d341 1
a341 1
if [ "X${lpd_enable}" = X"YES" ]; then
d345 4
a348 2
if [ "X${sendmail_enable}" = X"YES" -a -r /etc/sendmail.cf ]; then
	echo -n ' sendmail';	sendmail ${sendmail_flags}
@


1.104.2.9
log
@tickadj is useful even if ntpdate isn't selected (clock drift isn't
isolated to network time users) so make it a fully independant knob.
Suggested-By: Richard Crook <richard@@sj.co.uk>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.8 1997/04/26 22:39:33 jkh Exp $
a163 4
fi

if [ "X${tickadj_enable}" = X"YES" ]; then
    echo -n ' tickadj';	tickadj ${tickadj_flags--Aq}
@


1.104.2.10
log
@Be a little more descriptive about what daemons we're starting.
Submitted-By: "Philippe Charnier" <charnier@@xp11.frmug.org>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.9 1997/04/27 11:13:38 jkh Exp $
d217 1
a217 1
echo -n starting standard daemons:
@


1.104.2.11
log
@YAMF22
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.10 1997/05/01 04:41:04 jkh Exp $
a150 1
echo -n 'additional daemons:'
d163 1
a163 1
	echo -n ' syslogd';		syslogd ${syslogd_flags}
d167 1
a167 1
	echo -n ' tickadj';	tickadj ${tickadj_flags--Aq}
a168 1
echo '.'
@


1.104.2.12
log
@merged etc.i386/rc.i386 fix into RELENG_2_2
PR:
Reviewed by:
Submitted by:
Obtained from:
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.11 1997/05/01 06:01:35 jkh Exp $
d235 3
a237 3
if [ -f /etc/etc.${arch}/rc.${arch} ]; then
	. /etc/etc.${arch}/rc.${arch}
fi 
@


1.104.2.13
log
@backed out my previous change, re-enabled:
        . /etc/rc.${arch}

PR:
Reviewed by:
Submitted by:
Obtained from:	Bruce
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.12 1997/05/04 13:13:10 andreas Exp $
d235 3
a237 3
if [ -f /etc/rc.${arch} ]; then  
	. /etc/rc.${arch}
fi  
@


1.104.2.14
log
@YAMFC
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.13 1997/05/04 22:35:26 andreas Exp $
d220 1
a220 1
echo -n ' inetd';		inetd ${inetd_flags}
@


1.104.2.15
log
@Sendmail needs a full pathname or 'kill -HUP' fails.

Submitted by:  Jian-Da Li <jdli@@csie.nctu.edu.tw>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.14 1997/05/05 07:09:04 jkh Exp $
d228 1
a228 1
	echo -n ' sendmail';	/usr/sbin/sendmail ${sendmail_flags}
@


1.104.2.16
log
@YAMFC
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.15 1997/05/18 13:18:02 peter Exp $
d224 1
a224 1
	echo -n ' printer';		lpd ${lpd_flags}
@


1.104.2.17
log
@Merge from -current -- inetd_enable & cron_enable
Same caveats apply.
Reviewed by:	jkh
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.16 1997/05/19 08:02:37 jkh Exp $
d220 2
a221 7
if [ "X${inetd_enable}" = X"YES" ]; then
	echo -n ' inetd';	inetd ${inetd_flags}
fi

if [ "X${cron_enable}" = X"YES" ]; then
	echo -n ' cron';	cron
fi
@


1.104.2.18
log
@sh /etc/rc.local -> . /etc/rc.local
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.17 1997/06/18 16:02:33 pst Exp $
d296 1
a296 1
[ -f /etc/rc.local ] && . /etc/rc.local
@


1.104.2.19
log
@Merge from -currrent.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.18 1997/06/25 03:10:15 dima Exp $
d296 1
a296 1
[ -f /etc/rc.local ] && sh /etc/rc.local
@


1.104.2.20
log
@Merge /var/run cleaning from -current
@
text
@d2 1
a2 1
#	$Id: rc,v 1.131 1997/06/25 11:48:47 pst Exp $
a97 2
rm -f /var/run/*

d101 1
d240 1
a240 1
if [ -f /etc/rc.${arch} ]; then
d242 1
a242 1
fi
@


1.104.2.21
log
@Adjust wording slightly.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.20 1997/06/25 12:31:36 ache Exp $
d287 1
a287 1
	echo -n 'Local package initialization:'
@


1.104.2.22
log
@MFC: Don't redirect "mount -t -o nfs" to null
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.21 1997/07/13 13:23:40 jkh Exp $
d125 1
a125 1
mount -a -t nfs
@


1.104.2.23
log
@MFC: Change the not-specified-default for inetd & cron
     to "enabled".  This will avoid breaking things for
     idiots like me who update /etc/rc without paying
     attention and updating rc.conf too.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.22 1997/09/13 09:30:58 brian Exp $
d221 1
a221 1
if [ "X${inetd_enable}" != X"NO" ]; then
d225 1
a225 1
if [ "X${cron_enable}" != X"NO" ]; then
@


1.104.2.24
log
@MFC: unspam rev 1.114, kill `savecore_enable'
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.23 1997/09/13 21:08:29 brian Exp $
d137 4
d143 1
a143 2
if [ "X${dumpdev}" != X"NO" -a -e ${dumpdev} -a -d /var/crash ]; then
	dumpon ${dumpdev}
@


1.104.2.25
log
@Do not limit mfs partitions to 32meg.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.24 1997/09/21 16:10:34 joerg Exp $
a78 4
# If we don't have an unlimited "max memory" ulimit, then mfs partitions
# are limited to 32meg.
ULIMIT_MAX_MEM=`ulimit -d`
ulimit -d unlimited
a83 1
ulimit -d ${ULIMIT_MAX_MEM}
@


1.104.2.26
log
@Add note that things in /etc/rc are run under login class `daemon' by
/sbin/init.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.25 1997/11/24 04:31:45 obrien Exp $
a12 3

# Note that /sbin/init runs items from /etc/rc under the user class daemon.
# See login.conf(5) for more details.
@


1.104.2.27
log
@Remove my `ulimit' hack -- latest changes to /etc/login.conf fixed the
problem with mfs filesystems listed in /etc/fstab.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.26 1997/11/24 09:24:19 obrien Exp $
d82 4
d91 1
@


1.104.2.28
log
@Make rc record dmesg in /var/log/dmesg.boot
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.27 1997/11/30 01:33:22 obrien Exp $
a297 4

# Record dmesg buffer at boot
dmesg > /var/log/dmesg.boot
chmod 400 /var/log/dmesg.boot
@


1.104.2.29
log
@Back out last commit for dmesg.boot
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.28 1997/12/09 07:24:35 danny Exp $
d298 4
@


1.104.2.30
log
@Adds new configuration variable "ldconfig_extra_libdirs", whose contents
is appended to _LDC.  Useful for Motif or a truly local dir tree.

(Tested on my 2.2.5-S box for a month.)
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.29 1997/12/09 10:05:04 danny Exp $
a214 5
if [ "X${ldconfig_extra_libdirs}" != X ]; then
	for LDIR in $ldconfig_extra_libdirs; do
		if [ -d ${LDIR} ]; then _LDC="${_LDC} ${LDIR} " ; fi
	done
fi
@


1.104.2.31
log
@Change my $ldconfig_extra_libdirs to $ldconfig_paths to match the name
used in -CURRENT.  Note the semantics are still 2.2.x's in that /usr/compat,
/usr/local, and /usr/X11R6 are still in rc and not rc.conf.  (thus making
$ldconfig_paths entirely optional.

Bring in $clear_tmp_enable from -STABLE while I'm here.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.30 1998/01/29 10:50:21 obrien Exp $
a138 21
#
# Clearing /tmp at boot-time seems to have a long tradition.  It doesn't
# help in any way for long-living systems, and it might accidentally
# clobber files you would rather like to have preserved after a crash
# (if not using mfs /tmp anyway).
#
# See also the example of another cleanup policy in /etc/periodic/daily.
#
if [ "X${clear_tmp_enable}" = X"YES" ]; then
	echo clearing /tmp

	# prune quickly with one rm, then use find to clean up /tmp/[lq]*
	# (not needed with mfs /tmp, but doesn't hurt there...)
	(cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
	    find -d . ! -name . ! -name lost+found ! -name quotas -exec rm -rf -- {} \;)

	# Also remove X lock files since it will prevent you from
	# restarting X11 after a system crash.
	rm -f /tmp/.X*-lock /tmp/.X11-unix/*
fi

d215 2
a216 2
if [ -z $ldconfig_paths -a "X${ldconfig_paths}" != X ]; then
	for LDIR in $ldconfig_paths; do
@


1.104.2.32
log
@Remove useless test that I added.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.31 1998/01/29 11:01:28 obrien Exp $
d236 1
a236 1
if [ "X${ldconfig_paths}" != X ]; then
@


1.104.2.33
log
@MFC: selected improvements for etc files *not* including periodic changes,
     security tweaks or other kerberbos related stuff.  I expect that
     stuff to occur as a side-effect of what others will be doing in etc,
     if at all.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.32 1998/01/29 11:17:44 obrien Exp $
d14 3
d160 9
a193 9
# enable dumpdev so that savecore can see it
# /var/crash should be a directory or a symbolic link
# to the crash directory if core dumps are to be saved.
if [ "X${dumpdev}" != X"NO" -a -e ${dumpdev} -a -d /var/crash ]; then
	dumpon ${dumpdev}
	echo -n checking for core dump...
	savecore /var/crash
fi

d233 8
a240 5
for i in $ldconfig_paths; do
	if test -d $i; then
		_LDC="${_LDC} $i"
	fi
done
@


1.104.2.34
log
@MFC: Nuke directories in /var/run.

PR:		4138 5619 6793
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.33 1998/02/15 14:24:47 jkh Exp $
d98 1
a98 1
rm -rf /var/run/*
@


1.104.2.35
log
@MFC: Careful when cleaning /var
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.34 1998/06/04 00:20:34 mph Exp $
d98 4
a101 19
clean_var() {
  if [ ! -f /var/run/clean_var ]; then
    rm -rf /var/run/*
    rm -f /var/spool/lock/*
    rm -rf /var/spool/uucp/.Temp/*
    # Keep a copy of the boot messages around
    dmesg >/var/run/dmesg.boot
    # And an initial utmp file
    (cd /var/run && cp /dev/null utmp && chmod 644 utmp; )
    touch /var/run/clean_var
  fi
}

if [ -d /var/run -a -d /var/spool/lock -a -d /var/spool/uucp/.Temp ]; then
  # network_pass1() *may* end up writing stuff to /var - we don't want to
  # remove it immediately afterwards - *nor* to we want to fail to clean
  # an nfs-mounted /var.
  clean_var
fi
d132 3
a134 3

clean_var			# If it hasn't already been done
rm /var/run/clean_var
@


1.104.2.36
log
@MFC: Remove X11 lock files even when cleaning /tmp is not set.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.35 1998/08/12 23:49:09 brian Exp $
d167 3
a170 4

# Remove X lock files, since they will prevent you from restarting X11 
# after a system crash.
rm -f /tmp/.X*-lock /tmp/.X11-unix/*
@


1.104.2.37
log
@MFC: Spaces -> tabs, don't use touch before it's available
     Pointed out by: bde
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.36 1998/09/09 10:37:41 cracauer Exp $
d87 1
a87 1
	. /etc/rc.conf
d99 10
a108 10
	if [ ! -f /var/run/clean_var ]; then
		rm -rf /var/run/*
		rm -f /var/spool/lock/*
		rm -rf /var/spool/uucp/.Temp/*
		# Keep a copy of the boot messages around
		dmesg >/var/run/dmesg.boot
		# And an initial utmp file
		(cd /var/run && cp /dev/null utmp && chmod 644 utmp; )
		>/var/run/clean_var
	fi
d112 4
a115 4
	# network_pass1() *may* end up writing stuff to /var - we don't want to
	# remove it immediately afterwards - *nor* to we want to fail to clean
	# an nfs-mounted /var.
	clean_var
d165 1
a165 1
		find -d . ! -name . ! -name lost+found ! -name quotas -exec rm -rf -- {} \;)
d208 1
a208 1
	network_pass2
d220 1
a220 1
	network_pass3
@


1.104.2.38
log
@MFC: Start etc/rc.d stuff in a way that it is still interruptable
even if the called programs blocks signals.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.37 1998/09/16 22:43:36 brian Exp $
d326 1
a326 2
			[ -x ${script} ] && \
				(trap 'exit 1' 2 ; ${script} start ; echo -n)
@


1.104.2.39
log
@MFC: rev 1.190 and rev 1.181
@
text
@d2 1
a2 1
#	$Id: rc,v 1.104.2.38 1998/11/03 16:35:46 cracauer Exp $
a142 1
chflags 0 /dev/tty[pqrsPQRS]*
a143 1
chown root:wheel /dev/tty[pqrsPQRS]*
@


1.104.2.40
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.104.2.41
log
@MFC: quote filename variables in vi recovery
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.104.2.40 1999/09/05 11:01:58 peter Exp $
d289 1
a289 1
		if test ! -r "$i"; then
d295 2
a296 2
		if test -x "$i" -o ! -s "$i"; then
			rm -f "$i"
d306 1
a306 1
			if test ! -r "$i"; then
d313 1
a313 1
			recfile=`awk '/^X-vi-recover-path:/{print $2}' < "$i"`
d315 1
a315 1
				sendmail -t < "$i"
d317 1
a317 1
				rm -f "$i"
@


1.104.2.42
log
@MFC: don't break filenames with spaces into seperate arguments.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/rc,v 1.104.2.41 2000/01/05 09:18:20 peter Exp $
d287 1
a287 1
	for i in /var/tmp/vi.recover/vi.*; do
d304 1
a304 1
		for i in /var/tmp/vi.recover/recover.*; do
@


1.103
log
@Correct the startup sequence for syslogd:

. crate the symlink for /dev/log if required, then
. remove the old socket (savecore might have already created it
  accidentally), then
. start syslogd.

(Btw., our test(1) misses an option to test for a socket.)
@
text
@d2 1
a2 1
#	$Id: rc,v 1.102 1996/10/21 20:09:30 wpaul Exp $
d344 2
a345 2
virecovery=`echo /var/tmp/vi.recover/recover.*`
if [ "$virecovery" != '/var/tmp/vi.recover/recover.*' ]; then
d347 11
a357 2
	for i in $virecovery; do
		sendmail -t < $i
d359 22
@


1.102
log
@Add hooks for rpc.ypxfrd in /etc/sysconfig and /etc/rc. Also change
a couple of benign cases of 'yppasswdd' to 'rpc.yppasswdd.' (Like
rpc.yppasswdd, rpc.ypxfrd should only be run on NIS master servers.)
@
text
@d2 1
a2 1
#	$Id: rc,v 1.101 1996/10/08 20:02:57 peter Exp $
a123 1
rm -f /dev/log
d171 7
@


1.101
log
@Add a -p to the amd invocation, it's not optional since we are expecting
the pid on stdout for /var/run/amd.pid.  The example in sysconfig had
forgotten -p anyway...
@
text
@d2 1
a2 1
#	$Id: rc,v 1.100 1996/10/08 20:00:44 peter Exp $
d210 1
a210 1
# Run yppasswdd only on the NIS master server
d214 4
d219 1
a219 1
		echo -n ' yppasswdd'; rpc.yppasswdd ${yppasswddflags}
@


1.100
log
@Some tweaks after having run a YP-only system with quotas:
 - split the "starting network daemons" in half.
 - The first half starts things necessary to get full name service up.
 - The quota check etc moved from "before network" to after the name
   services are running.  quotacheck does a while(p=getpwent()) which
   isn't real good without YP running...
 - moved rwhod a little later to put it with the other network stuff.
 - deferred inetd a tad so that it's after ldconfig and dev_mkdb,
   otherwise you get logins before you're ready.

Unresolved: named is started before ypserv/ypbind still, but named does
a while(s = getservent()) and while (p=getprotoent()) to suck in the
entire database into memory.  This means you cannot have a "+" in the
/etc/services or /etc/protocols files or you get a long hang at boot.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.99 1996/09/22 06:36:49 imp Exp $
d255 1
a255 1
	amd ${amdflags} > /var/run/amd.pid
@


1.99
log
@Fix a possible syntax error in rc when swapfile isn't defined at all.
This can happen when the user is upgrading from an older version and
his/her sysconfig file doesn't have swapfile defined to be NO in it.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.98 1996/09/02 13:09:54 phk Exp $
a166 8
# Check the quotas
if [ "X${check_quotas}" = X"YES" ]; then
	echo 'checking quotas:'
	quotacheck -a
	echo ' done.'
	quotaon -a
fi

d174 1
a174 1
echo -n starting network daemons:
d227 8
a234 4
# $rwhod is imported from /etc/sysconfig;
# if $rwhod is set to YES, rwhod is run.
if [ "X${rwhod}" = X"YES" ]; then
	echo -n ' rwhod';	rwhod
d237 2
d258 6
a275 1
echo -n ' inetd';		inetd
d312 1
@


1.98
log
@Add support for shlibs in /usr/lib/compat that the linker will not find
at compile time, but ldd will at runtime.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.97 1996/08/21 23:15:36 jkh Exp $
d95 1
a95 1
if [ "x$swapfile" != "xNO" -a -w $swapfile -a -f /dev/vn0b ]; then
@


1.97
log
@Add a new "swapfile" variable so that you can add a file as a additional
swap as the system is coming up.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.96 1996/07/30 06:28:59 jkh Exp $
d298 1
@


1.96
log
@Edit this for consistency's sake (though it's syntactically identical).
Noticed-By: "William A. Gill" <bill@@duchess.wagill.com>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.95 1996/07/18 19:09:06 pst Exp $
d92 6
@


1.95
log
@Move things up a bit to make startup pretty
@
text
@d2 1
a2 1
#	$Id: rc,v 1.94 1996/07/13 17:27:39 pst Exp $
d179 1
a179 1
if [ "X${namedflags}" != "XNO" ]; then
@


1.94
log
@Start sendmail after ldconfig.  Put the nail in the coffin on misc/1346.
Submitted by:	Hiroharu Tamaru <tamaru@@ap.t.u-tokyo.ac.jp>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.93 1996/06/24 19:00:28 pst Exp $
a287 9
# Now start up miscellaneous daemons that don't belong anywhere else
#
echo -n standard daemons:
echo -n ' cron';		cron

if [ "X${lpd}" != X"NO" -a -x /usr/sbin/lpd ]; then
	echo -n ' printer';		lpd
fi

d297 9
@


1.93
log
@Start vi.recovery processing after ldconfig.
Closes misc/1346 which has bitten me more times than I care to remember.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.92 1996/06/22 13:05:20 joerg Exp $
a296 8
# $sendmail_flags is imported from /etc/sysconfig;
# if $sendmail_flags is something other than NO, sendmail is run.
if [ "X${sendmail_flags}" != X"NO" -a -r /etc/sendmail.cf ]; then
	echo -n ' sendmail';            /usr/sbin/sendmail ${sendmail_flags}
fi

echo '.'

d307 8
@


1.92
log
@Add a few hints about the cleaning policy of /tmp, including an example
(commented out) for how to purge it regularly.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.91 1996/06/15 17:04:48 jkh Exp $
a279 9
# Recover vi editor files.
virecovery=`echo /var/tmp/vi.recover/recover.*`
if [ "$virecovery" != '/var/tmp/vi.recover/recover.*' ]; then
	echo 'Recovering vi editor sessions'
	for i in $virecovery; do
		sendmail -t < $i
	done
fi

d320 9
@


1.91
log
@Cosmetic tweaks.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.90 1996/05/19 22:30:26 ache Exp $
d121 9
d136 8
@


1.90
log
@Remove obsoleted comment about adjkerntz
@
text
@d2 1
a2 1
#	$Id: rc,v 1.89 1996/05/08 09:25:57 jkh Exp $
d316 1
d322 1
@


1.89
log
@Nuke the nasty cleaning of /var/run after netstart starts - it nukes
gated's pid file, for one thing, and is just generally BAD.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.88 1996/05/03 05:37:04 asami Exp $
a86 4
# If the machine runs wall CMOS clock (compatible with MSDOS),
# activate following line by creating empty file /etc/wall_cmos_clock
# If this file not exist, following line does nothing (assumed
# the machine runs UTC CMOS clock). See adjkerntz(8) for details.
@


1.88
log
@Bring in ccd support.

Call ccdconfig before swapon if /etc/ccd.conf exists.

Obtained from: NetBSD
@
text
@d2 1
a2 1
#	$Id: rc,v 1.87 1996/03/14 18:24:05 nate Exp $
d123 1
a123 1
(cd /var/run && { rm -rf -- *; cp /dev/null utmp; chmod 644 utmp; })
@


1.87
log
@Renamed the relevant PC-Card support files to reflect the newest release.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.86 1996/03/12 15:39:24 nate Exp $
d24 6
@


1.86
log
@PC-CARD hooks.  Someday it will actually enable working code. :)

Reviewed by:	phk
Submitted by:	Tatsumi Hosokawa <hosokawa@@mt.cs.keio.ac.jp> & BSD Nomads

I re-wrote alot of this, but the ideas are based on the code from the
most recent pccard-snapshot.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.85 1996/02/23 10:44:49 adam Exp $
d98 2
a99 2
if [ -f /etc/pccardstart ]; then
	. /etc/pccardstart
@


1.85
log
@rpc.yppasswdd instead of yppasswdd
@
text
@d2 1
a2 1
#	$Id: rc,v 1.84 1996/02/09 12:20:37 jkh Exp $
d95 5
@


1.84
log
@Close PR conf/589 - amd should only evaluate ${amdflags}.
While I'm at it, add a commented-out sample amd flags line to sysconfig
and drop a sample amd.map file in this directory for easy copying.
I know that this file's contents are highly site-variable, but the one I've
chosen for an example is also the one I've seen on 99.9% of the amd-using
sites I've visited.  I think it's a fair default.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.83 1996/01/29 08:46:13 gpalmer Exp $
d193 1
a193 1
		echo -n ' yppasswdd'; yppasswdd ${yppasswddflags}
@


1.83
log
@Add an option to start mrouted. Off by default
@
text
@d2 1
a2 1
#	$Id: rc,v 1.82 1996/01/28 08:08:36 gpalmer Exp $
d227 1
a227 1
	amd -p -l /var/log/amd.log ${amdflags} > /var/run/amd.pid
@


1.82
log
@Add (at long last) an option to say if you want to run the printer
daemon (lpd) or not. Set to run it by default.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.81 1996/01/16 08:04:06 graichen Exp $
d235 5
@


1.81
log
@added the "-p" option to amd so that it writes it's pid to
/var/run/amd.pid and added the "-l /var/log/amd.log" option there too

added an entry for the "rotation" of /var/log/amd.log to newsyslog.conf
@
text
@d2 1
a2 1
#	$Id: rc,v 1.80 1995/12/28 01:24:04 jkh Exp $
d272 4
a275 1
echo -n ' printer';		lpd
@


1.80
log
@Go to new scheme for local_startup variable.  Now one can specify multiple
directories to check in looking for port startup scripts.  The specific gunge
for apache httpd, gated and pcnfsd in /etc/sysconfig and /etc/netstart is
gone now.  Note that pcnfsd's troubles aren't necessarily over (and probably
why NetBSD brought it into their sources) - anyone adding pcnfsd will STILL
have to tweak /etc/sysconfig in order to set the new variable
`weak_mountd_authentication' to YES.  The flags to mountd are directly affected
by pcnfsd's requirements for non-root mounts, unfortunately! :-(
Submitted by: paul & jkh
@
text
@d2 1
a2 1
#	$Id: rc,v 1.79 1995/12/09 19:40:12 ache Exp $
d226 2
a227 1
	echo -n ' amd';			amd ${amdflags}
@


1.79
log
@Use absolute path for sendmail daemon or sendmail can't find
itself on SIGHUP.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.78 1995/11/04 05:03:16 pst Exp $
d213 1
a213 1
	if [ "X${pcnfsd}" = X"YES" ]; then
d298 6
a303 3
if [ "X${local_startup}" != X"NO" -a -d ${local_startup} ]; then
	for script in ${local_startup}/*.sh; do
		[ -x ${script} ] && ${script} start
@


1.78
log
@remove path in front of kadmind, path already set correctly
@
text
@d2 1
a2 1
#	$Id: rc,v 1.77 1995/11/01 16:53:25 nate Exp $
d276 1
a276 1
	echo -n ' sendmail';		sendmail ${sendmail_flags} 
@


1.77
log
@Don't have ldconfig look in /usr/gnu/lib since it was removed before 2.0R.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.76 1995/11/01 00:22:45 ache Exp $
d233 1
a233 1
		(sleep 20; /usr/sbin/kadmind -n >/dev/null 2>&1 &) &
@


1.76
log
@If accounting becomes enabled and /var/account/acct
not exist, touch it, or accounting is never started
(it must be pre-existen file).
@
text
@d2 1
a2 1
#	$Id: rc,v 1.75 1995/10/29 12:43:47 ache Exp $
a287 1
	if [ -d /usr/gnu/lib ]; then _LDC="${_LDC} /usr/gnu/lib" ; fi
@


1.75
log
@Use back-quotes in `echo ...recover.*`
@
text
@d2 1
a2 1
#	$Id: rc,v 1.74 1995/10/28 23:32:26 pst Exp $
d260 5
a264 1
	echo 'turning on accounting';	accton /var/account/acct
@


1.74
log
@Recover vi recovery files on reboot.
Closes pr misc/556 and others.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.73 1995/09/19 10:19:39 jkh Exp $
d251 1
a251 1
virecovery='echo /var/tmp/vi.recover/recover.*'
@


1.73
log
@local_startup=/usr/local/etc/rc.d
[ As suggested by Satoshi - rc.local.d was pretty redundant under /usr/local;
  duh! :-)]

[ -f /etc/rc.local ] && sh /etc/rc.local
For backwards compatibilty with non-executable rc.local files.  Sorry, Bruce!

Submitted by:	asami & bde & jkh
@
text
@d2 1
a2 1
#	$Id: rc,v 1.72 1995/09/19 08:33:42 jkh Exp $
d251 2
a252 2
virecovery=/var/tmp/vi.recover/recover.*
if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
@


1.72
log
@Bring my fixes over from 2.1.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.71 1995/09/18 19:17:13 paul Exp $
d302 1
a302 1
[ -x /etc/rc.local ] && /etc/rc.local
@


1.71
log
@Removed startup code for pcnfsd and apache. These don't even exist
in FreeBSD and should never have got in here.

Removed hard-coded /etc/rc.local.d hacks and implemented a more flexible
solution.

Added a local configuration area to sysconfig.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.70 1995/09/18 07:38:18 jkh Exp $
d291 2
a292 2
if [ -f /etc/rc.$arch ]; then
	. /etc/rc.$arch
d295 3
a297 3
if [ "X${local_startup}" != X"NO" -a -d $local_startup ]; then
	for script in $local_startup/*.sh; do
		[ -x $script ] && $script start
@


1.70
log
@Add support for /etc/rc.local.d directory, ala SYSV.  If the purists
don't like it, they don't have to use it.  The check makes sure that
/etc/rc.local.d exists before attempting to do anything with it.  Now
packages will be able to add their startups as /etc/rc.local.d/<pkgname>.sh
in order to get local startup behavior.  Maybe we can stop adding
knobs to /etc/sysconfig for ports/packages now?
Submitted by:	wollman & jkh
@
text
@d2 1
a2 1
#	$Id: rc,v 1.69 1995/09/14 02:44:47 jkh Exp $
a228 10
# These should go elsewhere but netstart is too early and I don't
# want to touch rc.local, so...
if [ "X${pcnfsd}" = X"YES" -a -x /usr/local/libexec/rpc.pcnfsd ]; then
	echo -n ' rpc.pcnfsd'; /usr/local/libexec/rpc.pcnfsd &
fi

if [ "X${apache_httpd}" = X"YES" -a -x /usr/local/www/server/httpd ]; then
	echo -n ' apache httpd'; /usr/local/www/server/httpd &
fi

d295 2
a296 2
if [ -d /etc/rc.local.d ]; then
	for script in /etc/rc.local.d/*.sh; do
@


1.69
log
@Add checks for pcnfsd (flag to mountd must be added in this case)
and Apache httpd, so a user can be brought up to speed quickly.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.68 1995/07/20 16:26:25 wollman Exp $
d305 6
d312 1
a312 3
if [ -f /etc/rc.local ]; then
	sh /etc/rc.local
fi
@


1.68
log
@Not sure if Rod is still working in these or not, so here goes.

Add nis_ypsetflags sysconfig entry and appropriate code in rc to call
ypset if needed.  Should probably automatically add `-ypsetme' to ypbind
flags if this is set.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.67 1995/06/25 04:01:32 bde Exp $
d212 6
a217 1
	echo -n ' mountd';		mountd
d227 10
@


1.67
log
@Optionally set the dump device.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66 1995/05/15 19:50:59 rgrimes Exp $
d200 3
@


1.66
log
@The ``mount -a -t nfs'' should never have been backgrounded.  If you
have non-critical nfs volumes in /etc/fstab they should have option bg
on them.  The behavior of the system is more tuneable this way, and
allows a slow mounting /usr over nfs to work.

Submitted by:	bde
@
text
@d2 1
a2 1
#	$Id: rc,v 1.65 1995/05/15 08:39:08 davidg Exp $
d120 5
@


1.66.4.1
log
@Brought in changes from revs 1.67-1.68: support for dumpdev and
nis_ypsetflags sysconfig variables.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66 1995/05/15 19:50:59 rgrimes Exp $
a120 5
# enable dumpdev so that savecore can see it
if [ "X${dumpdev}" != X"NO" ]; then
	dumpon ${dumpdev}
fi

a194 3
	if [ "X${nis_ypsetflags}" != X"NO" ]; then
		echo -n ' ypset'; ypset ${nis_ypsetflags}
	fi
@


1.66.4.2
log
@Bring in my changes from the HEAD:
	Add pcnfsd / apache_httpd hooks.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.1 1995/08/25 03:37:21 davidg Exp $
d212 1
a212 6
	echo -n ' mountd'
	if [ "X${pcnfsd}" = X"YES" ]; then
		mountd -n
	else
		mountd
	fi
a221 10
fi

# These should go elsewhere but netstart is too early and I don't
# want to touch rc.local, so...
if [ "X${pcnfsd}" = X"YES" -a -x /usr/local/libexec/rpc.pcnfsd ]; then
	echo -n ' rpc.pcnfsd'; /usr/local/libexec/rpc.pcnfsd &
fi

if [ "X${apache_httpd}" = X"YES" -a -x /usr/local/www/server/httpd ]; then
	echo -n ' apache httpd'; /usr/local/www/server/httpd &
@


1.66.4.3
log
@Bring in changes from the HEAD.  Also fix the local rc file changes
to:
	A) Use consistent variable expansion syntax.

	B) *NOT* expect rc files to be directly in /usr/local/etc.  That
	   was a very poor choice since lots of ports dump things straight
	   into /usr/local/etc and invoking anything with a .sh suffix in
	   there would be a bad idea indeed.  It's now /usr/local/etc/rc.local.d
	   for much greater clarity and safety.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.2 1995/09/14 23:16:33 jkh Exp $
d301 2
a302 2
if [ -f /etc/rc.${arch} ]; then
	. /etc/rc.${arch}
d305 3
a307 4
if [ "X${local_startup}" != X"NO" -a -d ${local_startup} ]; then
	for script in ${local_startup}/*.sh; do
		[ -x ${script} ] && ${script} start
	done
a308 3

# Do traditional (but rather obsolete) rc.local file if it exists.
[ -x /etc/rc.local ] && /etc/rc.local
@


1.66.4.4
log
@Merge from HEAD
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.3 1995/09/19 08:30:39 jkh Exp $
d312 1
a312 1
[ -f /etc/rc.local ] && sh /etc/rc.local
@


1.66.4.5
log
@Back this out of 2.1 until we can reach some concensus about how to
do all this right in -current.  Sorry, Satoshi.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.4 1995/09/19 10:23:38 jkh Exp $
d303 6
@


1.66.4.6
log
@Update apache port knob to point to right executable.
Submitted by:	"Eric L. Hernes" <erich@@lodgenet.com>
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.5 1995/09/19 12:09:01 jkh Exp $
d235 2
a236 2
if [ "X${apache_httpd}" = X"YES" -a -x /usr/local/sbin/httpd ]; then
	echo -n ' apache httpd'; /usr/local/sbin/httpd &
@


1.66.4.7
log
@Brought in changes from revs 1.74-1.75: fix for vi recovery files.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.6 1995/10/19 08:07:09 jkh Exp $
d261 2
a262 2
virecovery=`echo /var/tmp/vi.recover/recover.*`
if [ "$virecovery" != '/var/tmp/vi.recover/recover.*' ]; then
@


1.66.4.8
log
@Changes from the HEAD branch: add options to load the linux LKM,
mrouted and disable lpd.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.7 1995/10/30 08:30:31 davidg Exp $
a245 4
if [ "X${mrouted}" != X"NO" -a -x /usr/sbin/mrouted ]; then
	echo -n ' mrouted'; mrouted ${mrouted}
fi

d277 1
a277 3
if [ "X${lpd}" != X"NO" -a -x /usr/sbin/lpd ]; then
	echo -n ' printer';		lpd
fi
@


1.66.4.9
log
@Bring in changes from the HEAD.

Bloat the -stable etc tree with unused PC-CARD support hooks to make
testing go easier.  This code won't do anything in -stable, but it
minimizes the # of patches the testers will have to make to their
systems.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.8 1996/01/29 14:46:47 gpalmer Exp $
a94 5
fi

# start up PC-card configuration
if [ -f /etc/rc.pccard ]; then
	. /etc/rc.pccard
@


1.66.4.10
log
@Bring in ccd support from -current.  Note that conf.c has two missing
entries in front of ccd (stl and qcam) and the ccd driver won't work
(wrong character special major) until someone fills the two slots.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.9 1996/03/22 17:26:47 nate Exp $
a23 6

# Configure ccd devices.
if [ -f /etc/ccd.conf ]
then
	ccdconfig -C
fi
@


1.66.4.11
log
@Merge from HEAD, except:

	Clients that used gnumalloc still do, despite the merge.  We're not
	bringing phkmalloc over.

	Thread stuff left out.

	PCCARD support left out.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.10 1996/05/03 06:02:34 asami Exp $
d87 4
d123 1
a123 1
(cd /var/run && { cp /dev/null utmp; chmod 644 utmp; })
d204 1
a204 1
		echo -n ' yppasswdd'; rpc.yppasswdd ${yppasswddflags}
d224 1
a224 1
	if [ "X${weak_mountd_authentication}" = X"YES" ]; then
d237 11
a247 2
	echo -n ' amd'
	amd ${amdflags} > /var/run/amd.pid
d254 1
a254 1
		(sleep 20; kadmind -n >/dev/null 2>&1 &) &
a256 1
# IP multicast routing daemon
d285 1
a285 5
	echo 'turning on accounting'
	if [ ! -e /var/account/acct ]; then
		touch /var/account/acct
	fi
	accton /var/account/acct
a291 1

d299 1
a299 1
	echo -n ' sendmail';            /usr/sbin/sendmail ${sendmail_flags}
d311 1
a319 9
fi

# for each valid dir in $local_startup, search for init scripts matching *.sh
if [ "X${local_startup}" != X"NO" ]; then
	for dir in ${local_startup}; do
		[ -d ${dir} ] && for script in ${dir}/*.sh; do
			[ -x ${script} ] && ${script} start
		done
	done
@


1.66.4.12
log
@This 3rd mega-commit should hopefully bring us back to where we were.
I can get it to `make world' succesfully, anyway!
@
text
@a86 4
# If the machine runs wall CMOS clock (compatible with MSDOS),
# activate following line by creating empty file /etc/wall_cmos_clock
# If this file not exist, following line does nothing (assumed
# the machine runs UTC CMOS clock). See adjkerntz(8) for details.
d119 1
a119 1
(cd /var/run && { rm -rf -- *; cp /dev/null utmp; chmod 644 utmp; })
d200 1
a200 1
		echo -n ' yppasswdd'; yppasswdd ${yppasswddflags}
d220 1
a220 1
	if [ "X${pcnfsd}" = X"YES" ]; then
d233 2
a234 11
	echo -n ' amd';			amd ${amdflags}
fi

# These should go elsewhere but netstart is too early and I don't
# want to touch rc.local, so...
if [ "X${pcnfsd}" = X"YES" -a -x /usr/local/libexec/rpc.pcnfsd ]; then
	echo -n ' rpc.pcnfsd'; /usr/local/libexec/rpc.pcnfsd &
fi

if [ "X${apache_httpd}" = X"YES" -a -x /usr/local/sbin/httpd ]; then
	echo -n ' apache httpd'; /usr/local/sbin/httpd &
d241 1
a241 1
		(sleep 20; /usr/sbin/kadmind -n >/dev/null 2>&1 &) &
d244 1
d273 5
a277 1
	echo 'turning on accounting';	accton /var/account/acct
d284 1
d292 1
a292 1
	echo -n ' sendmail';		sendmail ${sendmail_flags} 
a303 1
	if [ -d /usr/gnu/lib ]; then _LDC="${_LDC} /usr/gnu/lib" ; fi
d312 9
@


1.66.4.13
log
@Merge very small, selected parts of this directory from HEAD.  Mostly
motivated by a desire to see the local_startup stuff work correctly
for the packages collection in 2.1.5.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.12 1996/06/05 02:36:34 jkh Exp $
d87 4
d123 1
a123 1
(cd /var/run && { cp /dev/null utmp; chmod 644 utmp; })
d204 1
a204 1
		echo -n ' yppasswdd'; rpc.yppasswdd ${yppasswddflags}
d224 1
a224 1
	if [ "X${weak_mountd_authentication}" = X"YES" ]; then
d237 11
a247 2
	echo -n ' amd'
	amd ${amdflags} > /var/run/amd.pid
d254 1
a254 1
		(sleep 20; kadmind -n >/dev/null 2>&1 &) &
a256 1
# IP multicast routing daemon
d285 1
a285 5
	echo 'turning on accounting'
	if [ ! -e /var/account/acct ]; then
		touch /var/account/acct
	fi
	accton /var/account/acct
a291 1

d299 1
a299 1
	echo -n ' sendmail';            /usr/sbin/sendmail ${sendmail_flags}
d311 1
a319 11
fi

# for each valid dir in $local_startup, search for init scripts matching *.sh
if [ "X${local_startup}" != X"NO" ]; then
	echo -n 'Local package startup:'
	for dir in ${local_startup}; do
		[ -d ${dir} ] && for script in ${dir}/*.sh; do
			[ -x ${script} ] && ${script} start
		done
	done
	echo .
@


1.66.4.14
log
@rpc.yppasswd doesn't exist in -stable.  Use yppasswd instead.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.13 1996/06/17 09:17:10 jkh Exp $
d200 1
a200 1
		echo -n ' yppasswdd'; yppasswdd ${yppasswddflags}
@


1.66.4.15
log
@Merge the changes from rev 1.19 of /etc/daily and 1.92 of /etc/rc --
Hint about alternatives to the boot-time cleanup of /tmp
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.14 1996/06/19 21:41:56 nate Exp $
a120 9
#
# Clearing /tmp at boot-time is essentially stupid, but seems to have
# a long tradition.  It doesn't help in any way for long-living systems,
# and it might accidentally clobber files you would rather like to have
# preserved after a crash (if not using mfs /tmp anyway).
#
# See also the commented out example of another cleanup policy in
# /etc/daily.
#
a126 6

# If you disable the above, make sure to uncomment the line below.
#
# clean up leftover X lock files and local connection sockets
#rm -f /tmp/.X*-lock /tmp/.X11-unix/*

@


1.66.4.16
log
@Bring /usr/lib/compat to 2.1 branch.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.66.4.15 1996/06/25 14:56:02 joerg Exp $
a315 1
	if [ -d /usr/lib/compat ]; then _LDC="${_LDC} /usr/lib/compat" ; fi
@


1.66.4.17
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.65
log
@Fixed incompleteness that would allow dirty filesystems to get mounted
when the single user shell was terminated. These changes disallow mounting
or R/W upgrading filesystems that are dirty unless "-f" (force) option
is used with mount. /etc/rc has been modified to abort the startup if
one or more non-nfs partitions fail to mount.

Reviewed by:	Poul-Henning Kamp, Rod Grimes
@
text
@d2 1
a2 1
#	$Id: rc,v 1.64 1995/05/11 21:11:17 jkh Exp $
d102 1
a102 1
mount -a -t nfs >/dev/null 2>&1 &	# XXX shouldn't need background
@


1.64
log
@Document the fact that almost all the user configuration stuff is now
in /etc/sysconfig, per Luigi's suggestion.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.63 1995/04/11 18:36:10 ache Exp $
d68 4
d74 1
d76 4
@


1.63
log
@Add -r to rm -f /var/spool/uucp/.Temp/*
@
text
@d2 1
a2 1
#	$Id: rc,v 1.62 1995/04/11 01:22:21 rgrimes Exp $
d9 4
@


1.62
log
@Remove obsolete comments about my-name and my-network.

Have netstart directly source sysconfig so that it stands on its own.
Do not source netstart in rc, run it with sh.

Rework the dangerous /etc/hostname.* so that it uses a variable with
a list of interfaces and a variable for each interface in that list.
The files /etc/hostname.* become obsolete with this change, the
information is now stored in /etc/sysconfig.

Source any /etc/start_if.${ifn} files so they can export things to
netstart (plans for future enhancements in this area.)

Obsolete /etc/defaultrouter, this is now down with $defaultrouter from
sysconfig.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.61 1995/04/09 09:54:42 rgrimes Exp $
d97 1
a97 1
rm -f /var/spool/uucp/.Temp/*
@


1.61
log
@This is a purely cosmetic clean up.  Fix many cut and paste problems that
had turned tabs into spaces.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.60 1995/03/30 06:26:09 rgrimes Exp $
d86 1
a86 1
	. /etc/netstart
@


1.60
log
@This is the rc work as provided by pts, I will me makeing some additional
changes to it based upon other outstanding bug reports and commits made
after his work.

Comments:

(a) sysconfig is still used to do all configuration.  I was not going to
    change that out from under you.... a user never need edit netstart
    or rc* unless they're being very weird.

(b) rc.maint has been folded back into rc.  It is just unworkable as
    a separate chunk because of ordering bogosities

(c) netstart does what it says... it starts up enough of the network to
    get up,  it doesn't start every bloody daemon that might talk to a
    socket...  netstart ifconfig's the devices and sets up routing if
    configured to do so.

(d) nfs disks are mounted immediately after netstart completes

(e) syslog is started as early as possible (right after nfs) so that error
    messages can get logged to remote syslog servers properly

(f) named is started (there is an argument that says that named should be
    started before syslogd because if you are the dns server for your domain,
    you'd like named to resolve remote hosts in syslog.conf,  but this is
    a minority case and the trivial workarround is to put the syslog host
    in /etc/hosts or use an /etc/resolv.conf -- why? because you want syslog
    to catch named errors, which is a MUCH more important and likely occurance)

(g) NOW all of the rest of the network daemons such as the time stuff, RPC,
    NIS, NFS, Kerberos and inetd are started

(h) the rest of the generic stuff is done (cron/printer/sendmail)

(i) shared libraries are set

(j) /etc/rc.i386 is run (this does FreeBSD/386 specific stuff like ibcs2,
    xtend, and all of the syscons stuff
    (this is actually started as /etc/rc.`uname -m`

(k) the syscons stuff has gotten a serious cleaning to make it consistent
    with rc conventions

(l) rc.local has had the comments about syscons removed (they are not relevant
    to this file now) and the full name of the kernel has been restored to
    /etc/motd

Submitted by:	pts
@
text
@d2 1
a2 1
#	$Id: rc,v 1.59 1995/03/30 00:01:08 ache Exp $
d132 1
a132 1
echo ' syslogd.';                       syslogd
d138 1
a138 1
	echo -n ' named';	named $namedflags
d172 1
a172 1
        echo -n ' ypserv'; ypserv ${nis_serverflags}
d175 1
a175 1
	        echo -n ' yppasswdd'; yppasswdd ${yppasswddflags}
d181 1
a181 1
        echo -n ' ypbind'; ypbind ${nis_clientflags}
d241 1
a241 1
echo -n ' printer';             lpd
@


1.59
log
@Add function keys change setup
@
text
@d2 1
a2 1
#	$Id: rc,v 1.58 1995/03/29 03:42:16 jkh Exp $
d84 3
a86 3
# Do system maintainance functions.
if [ -f /etc/rc.maint ]; then
	. /etc/rc.maint
d89 36
a124 3
# Start up the network
if [ -f /etc/netstart ]; then
	. /etc/netstart
d127 2
a128 1
# Now start up miscellaneous daemons that don't belong anywhere else
d130 37
a166 4
echo -n standard daemons:
echo -n ' cron';		cron
if [ "X${xtend}" != X"NO" -a -x /usr/libexec/xtend ]; then
 	echo -n ' xtend';   /usr/libexec/xtend
a167 2
echo -n ' printer';             lpd
echo '.'
d169 9
a177 1
mount -a -t nfs >/dev/null 2>&1 &	# XXX shouldn't need background
d179 3
a181 10
# Make shared lib searching a little faster.  Leave /usr/lib first if you
# add your own entries or you may come to grief.
if [ -x /sbin/ldconfig ]; then
	_LDC=/usr/lib
	if [ -d /usr/X11R6/lib ]; then _LDC="${_LDC} /usr/X11R6/lib" ; fi
	if [ -d /usr/X386/lib ]; then _LDC="${_LDC} /usr/X386/lib" ; fi
	if [ -d /usr/local/lib ]; then _LDC="${_LDC} /usr/local/lib" ; fi
	if [ -d /usr/gnu/lib ]; then _LDC="${_LDC} /usr/gnu/lib" ; fi
	echo 'setting ldconfig path:' ${_LDC}
	ldconfig ${_LDC}
d184 5
a188 1
######################### Start Of Syscons Section #######################
d190 3
a192 34
kbdadjust=NO
[ "X${keymap}" != X"NO" -o "X${keyrate}" != X"NO" \
	-o "X${keychange}" != X"NO" ] && kbdadjust=YES
vidadjust=NO
[ "X${scrnmap}" != X"NO" -o "X${font8x16}" != X"NO" -o \
	"X${font8x14}" != X"NO" -o "X${font8x8}" != X"NO" -o \
	"X${blanktime}" != X"NO" ] && vidadjust=YES

[ "X${kbdadjust}" != X"NO" -o "X${vidadjust}" != X"NO" -o \
	"X${saver}" != X"NO" ] && echo "starting syscons:"

[ "X${kbdadjust}" != X"NO" ] && echo -n " kbdcontrol:"

# keymap
if [ "X${keymap}" != X"NO" ]; then
	echo -n " keymap"
	kbdcontrol -l ${keymap}
fi

# keyrate
if [ "X${keyrate}" != X"NO" ]; then
	echo -n " keyrate"
	kbdcontrol -r ${keyrate}
fi

# change function keys
if [ "X${keychange}" != X"NO" ]; then
	echo -n " keychange"
	set - ${keychange}
	while [ $# -gt 0 ]
	do
		kbdcontrol -f "$1" "$2"
		shift; shift
	done
d195 3
a197 2
[ "X${kbdadjust}" != X"NO" ] && echo
[ "X${vidadjust}" != X"NO" ] && echo -n " vidcontrol:"
d199 2
a200 4
# screen mapping
if [ "X${scrnmap}" != X"NO" ]; then
	echo -n " screen_map"
	vidcontrol -l ${scrnmap}
d203 5
a207 4
# font 8x16
if [ "X${font8x16}" != X"NO" ]; then
	echo -n " font8x16"
	vidcontrol -f 8x16 ${font8x16}
d210 12
a221 4
# font 8x14
if [ "X${font8x14}" != X"NO" ]; then
	echo -n " font8x14"
	vidcontrol -f 8x14 ${font8x14}
d224 7
a230 4
# font 8x8
if [ "X${font8x8}" != X"NO" ]; then
	echo -n " font8x8"
	vidcontrol -f 8x8 ${font8x8}
d233 2
a234 4
# blank time
if [ "X${blanktime}" != X"NO" ]; then
	echo -n " blank_time"
	vidcontrol -t ${blanktime}
d237 5
a241 1
[ "X${vidadjust}" != X"NO" ] && echo "."
d243 4
a246 5
# screen saver
if [ "X${saver}" != X"NO" ] ; then
	echo -n "screensaver: "
	modstat | grep _saver || modload -u -o /tmp/saver_mod -e \
				 saver_init -q /lkm/${saver}_saver_mod.o
d249 13
a261 1
######################### End Of Syscons Section #######################
d263 4
a266 4
# Start the SCO binary emulation if requested.
if [ "X${ibcs2}" = X"YES" ]; then
	echo "Enabling ibcs2 emulation."
	ibcs2
@


1.58
log
@Move the invocation of rc.maint ahead of netstart.  This is actually OK
since /var wouldn't be mounted at this point anyway - the mount of NFS
comes after both of them are run.  This closes misc/276.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.57 1995/03/29 03:35:10 jkh Exp $
d121 2
a122 1
[ "X${keymap}" != X"NO" -o "X${keyrate}" != X"NO" ] && kbdadjust=YES
d143 11
@


1.57
log
@1. Add missing -n's to echo lines, closing misc/278
2. Make output of spaces follow conventions used elsewhere.
3. Inform user of a few things being started that were silent before.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.56 1995/03/26 18:18:58 wpaul Exp $
a83 5
# start up the network
if [ -f /etc/netstart ]; then
	. /etc/netstart
fi

d87 5
@


1.56
log
@Make syslogd work again: in needs to be started in netstart right
before the rest of the system daemons are brought up and *after* the
network interfaces have been configured.

Also fix one other potential problem: the NIS services need to be started
relavively early since some of the other daemons might need them. The
automounter is a good example: if you use amd with NIS-based maps, you'd
better have NIS running before you start it. :) I think mountd might
need it too, now that netgroups can be read via NIS as well.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.55 1995/03/24 00:16:24 jkh Exp $
d130 1
a130 1
[ "X${kbdadjust}" != X"NO" ] && echo "kbdcontrol: "
d134 1
a134 1
	echo -n "keymap "
d140 1
a140 1
	echo -n "keyrate "
d145 1
a145 1
[ "X${vidadjust}" != X"NO" ] && echo "vidcontrol: "
d149 1
a149 1
	echo -n "screen_map "
d155 1
a155 1
	echo -n "font8x16 "
d161 1
a161 1
	echo -n "font8x14 "
d167 1
a167 1
	echo -n "font8x8 "
d173 1
a173 1
	echo -n "blank_time "
d177 1
a177 1
[ "X${vidadjust}" != X"NO" ] && echo
d190 1
@


1.55
log
@start syslog earlier
add optional ibcs2 startup
@
text
@d2 1
a2 1
#	$Id: rc,v 1.54 1995/03/24 00:11:02 jkh Exp $
a72 4

echo 'system logger'
rm -f /dev/log
syslogd
@


1.54
log
@Correct a few spelling bogons.
Submitted by:	phk
@
text
@d2 1
a2 1
#	$Id: rc,v 1.53 1995/03/24 00:01:20 jkh Exp $
d74 4
d191 5
@


1.53
log
@Get around problem of not exporting variables in sysconfig
@
text
@d2 1
a2 1
#	$Id: rc,v 1.52 1995/03/23 06:42:36 jkh Exp $
d127 1
a127 1
[ "X${kbdajust}" != X"NO" -o "X${vidajust}" != X"NO" -o \
d130 1
a130 1
[ "X${kbdajust}" != X"NO" ] && echo "kbdcontrol: "
d144 2
a145 2
[ "X${kbdajust}" != X"NO" ] && echo
[ "X${vidajust}" != X"NO" ] && echo "vidcontrol: "
d177 1
a177 1
[ "X${vidajust}" != X"NO" ] && echo
@


1.52
log
@rc.netstart -> netstart
@
text
@d2 1
a2 1
#	$Id: rc,v 1.51 1995/03/23 01:25:16 jkh Exp $
d81 1
a81 1
	sh /etc/rc.serial
d86 1
a86 1
	sh /etc/netstart
d91 1
a91 1
	sh /etc/rc.maint
@


1.51
log
@Another pass through our rc files in an attempt to eliminate historical
crufy and generally make all of this easier to understand and modify.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.50 1995/03/22 03:29:52 ache Exp $
d85 2
a86 2
if [ -f /etc/rc.netstart ]; then
	sh /etc/rc.netstart
@


1.50
log
@Almost full syscons setup via rc & sysconfig
@
text
@d2 1
a2 1
#	$Id: rc,v 1.49 1995/03/21 16:44:03 wollman Exp $
d84 3
a86 18
# set hostname, turn on network
echo 'starting network'
. /etc/netstart

# clean up left-over files
rm -f /etc/nologin
rm -f /var/spool/lock/*
rm -f /var/spool/uucp/.Temp/*
(cd /var/run && { rm -rf -- *; cp /dev/null utmp; chmod 644 utmp; })

echo -n ' system logger'
rm -f /dev/log
syslogd

# $timedflags is imported from /etc/sysconfig;
# if $timedflags == NO, timed isn't run.
if [ "X${timedflags}" != X"NO" ]; then
	echo -n ' time daemon'; timed $timedflags
a87 23
echo '.'

# /var/crash should be a directory or a symbolic link
# to the crash directory if core dumps are to be saved.
if [ "X${savecore}" = X"YES" -a -d /var/crash ]; then
	echo; echo -n checking for core dump...
	savecore /var/crash
	echo done.
fi

if [ "X${check_quotas}" = X"YES" ]; then
	echo ' checking quotas:'
	quotacheck -a
	echo ' done.'
	quotaon -a
fi

# build ps databases
kvm_mkdb 
dev_mkdb

# snapshot any kernel -c changes back to disk
/sbin/dset -q
d89 3
a91 27
chmod 666 /dev/tty[pqrs]*

# check the password temp/lock file
if [ -f /etc/ptmp ]
then
	logger -s -p auth.err \
	'password file may be incorrect -- /etc/ptmp exists'
fi

# Recover vi editor files.
virecovery=/var/tmp/vi.recover/recover.*
if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
	echo 'Recovering vi editor sessions'
	for i in $virecovery; do
		sendmail -t < $i
	done
fi

echo clearing /tmp

# prune quickly with one rm, then use find to clean up /tmp/[lq]*
# (not needed with mfs /tmp, but doesn't hurt there...)
(cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
    find -d . ! -name . ! -name lost+found ! -name quotas -exec rm -rf -- {} \;)

if [ "X${accounting}" = X"YES" -a -d /var/account ]; then
	echo 'turning on accounting';	accton /var/account/acct
d94 2
d98 2
a99 72
echo '.'

echo -n starting network daemons:

# Portmapper should always be run, to provide RPC services for inetd.
if [ -x /usr/sbin/portmap ]; then
	echo -n ' portmap';		portmap
fi

# $gated and $routedflags are imported from /etc/sysconfig.
# If $gated == YES, gated is used; otherwise routed.
# If $routedflags == NO, routed isn't run.
if [ "X${gated}" = X"YES" -a -r /etc/gated.conf ]; then
	echo -n ' gated';	gated $gatedflags
elif [ "X${routedflags}" != X"NO" ]; then
	echo -n ' routed';	routed $routedflags
fi

# $namedflags is imported from /etc/sysconfig
if [ "X${namedflags}" != "XNO" ]; then
	echo -n ' named';	named $namedflags
fi

# $ntpdate and $xntpdflags are imported from /etc/sysconfig.
# If $ntpdate != NO, run ntpdate $ntpdate to set the date correctly.
# If $xntpdflags != NO, start xntpd.
if [ "X${ntpdate}" != X"NO" -o "X${xntpdflags}" != X"NO" ]; then
	if [ "X${tickadjflags}" != X"NO" ]; then
		echo -n ' tickadj';	tickadj ${tickadjflags--Aq}
	fi

	if [ "X${ntpdate}" != X"NO" ]; then
		echo -n ' ntpdate';	ntpdate ${ntpdate}
	fi

	if [ "X${xntpdflags}" != X"NO" ]; then
		echo -n ' xntpd';	xntpd ${xntpdflags}
	fi
fi

# $rwhod is imported from /etc/sysconfig;
# if $rwhod is set to YES, rwhod is run.
if [ "X${rwhod}" = X"YES" ]; then
	echo -n ' rwhod';	rwhod
fi

echo -n ' printer';		lpd

if [ "X${nfs_server}" = X"YES" -a -r /etc/exports ]; then
	echo -n ' mountd';		mountd
	echo -n ' nfsd';		nfsd -u -t 4
fi

if [ "X${nfs_client}" = X"YES" ]; then
	echo -n ' nfsiod';		nfsiod -n 4
fi

if [ "X${amdflags}" != X"NO" ]; then
	echo -n ' amd';			amd ${amdflags}
fi

# $sendmail_flags is imported from /etc/sysconfig;
# if $sendmail_flags is something other than NO, sendmail is run.
if [ "X${sendmail_flags}" != X"NO" -a -r /etc/sendmail.cf ]; then
	echo -n ' sendmail';		sendmail ${sendmail_flags} 
fi

# Kerberos runs ONLY on the Kerberos server machine
if [ "X${kerberos_server}" = X"YES" ]; then
	echo -n ' kerberos';	kerberos >> /var/log/kerberos.log &
	echo -n ' kadmind'; \
		(sleep 20; /usr/sbin/kadmind -n >/dev/null 2>&1 &) &
d101 1
a101 18

# Start ypserv if we're an NIS server.
# Run yppasswdd only on the NIS master server
if [ "X${nis_serverflags}" != X"NO" ]; then
        echo -n ' ypserv'; ypserv ${nis_serverflags}

	if [ "X${yppasswddflags}" != X"NO" ]; then
	        echo -n ' yppasswdd'; yppasswdd ${yppasswddflags}
	fi
fi


# Start ypbind if we're an NIS client
if [ "X${nis_clientflags}" != X"NO" ]; then
        echo -n ' ypbind'; ypbind ${nis_clientflags}
fi

echo -n ' inetd';		inetd
a105 4
if [ "X${xtend}" != X"NO" -a -x /usr/libexec/xtend ]; then
 	echo -n ' xtend';   /usr/libexec/xtend
fi

d188 4
a191 1
. /etc/rc.local
a193 1

@


1.49
log
@Change named starting convention to use $namedflags like most other
daemons that take command-line arguments.  Correct /etc/namedb installation
to use the correct files.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.48 1995/03/21 15:20:47 jkh Exp $
d269 62
a330 1
# Syscons screen saver
d332 3
a334 2
	echo -n "syscons screensaver: "
	modload -u -o /tmp/saver_mod -e saver_init -q /lkm/${saver}_saver_mod.o
d337 1
a337 5
# Syscons keymap
if [ "X${keymap}" != X"NO" ]; then
	echo -n "syscons keymap: "
	kbdcontrol -l ${KEYMAP}
fi
@


1.48
log
@Begin a long-overdue cleanup of this whole mess.

1. Move all system configuration variables into /etc/sysconfig
2. Adapt other files to use it.
3. Add a host of new variables for micro-managing your system in various
   ways.  For 2.1, /etc/sysconfig will be machine-edited so that the user
   doesn't even have to care at all about the various funny names we picked.
4. Enable dset.  We won't get it debugged if we never use it, and no one
   has said anything negative about it yet, so here goes!
5. Try to use one consistent style throughout.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.47 1995/03/17 17:57:24 rgrimes Exp $
d98 1
a98 1
# $timedflags is imported from /etc/netstart;
d167 1
a167 1
# $gated and $routedflags are imported from /etc/netstart.
d176 3
a178 2
if [ "X${name_server}" = X"YES" -a -r /etc/namedb/named.boot ]; then
	echo -n ' named';		named -b /etc/namedb/named.boot
d181 1
a181 1
# $ntpdate and $xntpdflags are imported from /etc/netstart.
d198 1
a198 1
# $rwhod is imported from /etc/netstart;
d219 1
a219 1
# $sendmail_flags is imported from /etc/netstart;
@


1.47
log
@Remove extra fi that caused this script to fail during boot.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.46 1995/03/16 16:58:00 wollman Exp $
a67 11
# This stuff needed for proper daemons tuning, comsat f.e.
# See profile and csh.login also.
# Uncomment next line if you want to setup your 8-bit locale at program
# startup automatically
# ENABLE_STARTUP_LOCALE=; export ENABLE_STARTUP_LOCALE
# Uncomment next line to activate russian locale
# LANG=ru_SU.KOI8-R; export LANG
# Uncomment next line to activate italian locale
# LANG=it_IT.ISO8859-1; export LANG
# For full locales list check /usr/share/locale/*

d74 5
d80 1
a80 2
if [ -f /etc/rc.serial ]
then
d94 1
a94 1
echo -n 'starting system logger'
d100 2
a101 2
if [ X"${timedflags}" != X"NO" ]; then
	echo -n ', time daemon'; timed $timedflags
d107 2
a108 2
if [ X${savecore} != X"NO" -a -d /var/crash ]; then
	echo checking for core dump...
d110 1
d113 6
a118 4
#				echo -n 'checking quotas:'
#quotacheck -a
#				echo ' done.'
#quotaon -a
d124 2
a125 2
# snapshot any kernel changes back to disk
#/sbin/dset -q
d152 3
a154 1
# echo 'turning on accounting';	accton /var/account/acct
d170 1
a170 1
if [ X${gated} = X"YES" -a -r /etc/gated.conf ]; then
d172 1
a172 1
elif [ X"${routedflags}" != X"NO" ]; then
d176 1
a176 1
if [ X${name_server} = X"YES" -a -r /etc/namedb/named.boot ]; then
d183 2
a184 2
if [ X"${ntpdate}" != X"NO" -o X"${xntpdflags}" != X"NO" ]; then
	if [ X"${tickadjflags}" != X"NO" ]; then
d188 1
a188 1
	if [ X"${ntpdate}" != X"NO" ]; then
d192 1
a192 1
	if [ X"${xntpdflags}" != X"NO" ]; then
d198 2
a199 2
# if $rwhod is set to something other than NO, rwhod is run.
if [ X"${rwhod}" != X"NO" ]; then
d205 1
a205 1
if [ X${nfs_server} = X"YES" -a -r /etc/exports ]; then
d210 1
a210 1
if [ X"${nfs_client}" != X"NO" ]; then
d214 1
a214 1
if [ X"${amdflags}" != X"NO" ]; then
d220 1
a220 1
if [ X"${sendmail_flags}" != X"NO" -a -r /etc/sendmail.cf ]; then
d225 1
a225 1
if [ X"${kerberos_server}" = X"YES" ]; then
d233 2
a234 2
if [ X"${nis_serverflags}" != X"NO" ]; then
        echo -n ' ypserv'; ypserv $nis_serverflags
d236 2
a237 2
	if [ X"${yppasswddflags}" != X"NO" ]; then
	        echo -n ' yppasswdd'; yppasswdd $yppasswddflags
d243 2
a244 2
if [ X"${nis_clientflags}" != X"NO" ]; then
        echo -n ' ypbind'; ypbind $nis_clientflags
d252 3
a254 3
# if [ -x /usr/libexec/xtend ]; then
# 	echo -n ' xtend';   /usr/libexec/xtend
# fi
d266 12
@


1.46
log
@Semi-major RC file cleanup:

- Do ntp right
- Move recenrly-added and long-standing junk from rc.local into rc, so
. that rc.local truly is LOCAL.
- Fix named invocation to use the correct boot file location.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.45 1995/01/26 19:04:29 jkh Exp $
a230 1
	fi
@


1.45
log
@Disable dset for now - Bruce says it hoses the show.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.44 1995/01/24 16:49:14 jkh Exp $
d178 2
a179 2
if [ X${name_server} = X"YES" -a -r /etc/named.boot ]; then
	echo -n ' named';		named
d185 4
a188 3
if [ X"${ntpdate}" != X"NO" ]; then
	echo ' ntpdate';	ntpdate $ntpdate
fi
d190 2
a191 3
if [ X"${xntpdflags}" != X"NO" ]; then
	if [ X"${tickadjflags}" != X"NO" ]; then
		echo 'adjusting kernel for xntpd'; tickadj ${tickadjflags--A}
a192 2
	echo 'starting xntpd';	xntpd ${xntpdflags}
fi
d194 3
a196 2
if [ X"${ntpdate}" != X"NO" -o X"${xntpdflags}" != X"NO" ]; then
	echo -n 'starting more network daemons:'
d224 24
@


1.44
log
@Add dset call to rc file, right after the databases are rebuilt.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.43 1994/12/18 01:21:51 ache Exp $
d129 1
a129 1
/sbin/dset -q
@


1.43
log
@timedflags quoted
Submitted by: root@@uglabgw.ug.cs.sunysb.edu
@
text
@d2 1
a2 1
#	$Id: rc,v 1.42 1994/12/05 19:46:35 ache Exp $
d127 3
@


1.42
log
@Add yet one locale example, this time ISO8859-1 as most common example.
Add reference where find full locales list
@
text
@d2 1
a2 1
#	$Id: rc,v 1.41 1994/11/26 19:25:14 ache Exp $
d107 1
a107 1
if [ X${timedflags} != X"NO" ]; then
@


1.41
log
@Call rc.local with . instead of sh to pass variables
Submitted by: John Capo
@
text
@d2 1
a2 1
#	$Id: rc,v 1.40 1994/11/17 08:28:02 smace Exp $
d75 3
@


1.40
log
@fix if test for rwhod.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.39 1994/11/07 04:02:26 phk Exp $
d242 1
a242 1
sh /etc/rc.local
@


1.39
log
@Only so savecore if people ask for it.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.38 1994/11/02 09:41:35 ache Exp $
d196 1
a196 1
if [ ${rwhod-NO} != "NO" ]; then
@


1.38
log
@Restore back -i for adjkerntz
@
text
@d2 1
a2 1
#	$Id: rc,v 1.37 1994/11/01 16:24:03 ache Exp $
d111 1
a111 1
if [ -d /var/crash ]; then
@


1.37
log
@Remove -i options from adjkerntz call
@
text
@d2 1
a2 1
#	$Id: rc,v 1.36 1994/10/30 04:33:57 ache Exp $
d80 1
a80 1
adjkerntz
@


1.36
log
@Add commented out startup locale setup, needed for some daemons
like comsat
@
text
@d2 1
a2 1
#	$Id: rc,v 1.35 1994/10/25 08:23:02 davidg Exp $
d80 1
a80 1
adjkerntz -i
@


1.35
log
@Moved swapon -a to before the fsck. It isn't possible to run fsck on
moderately sized filesystems on 4MB machines otherwise.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.34 1994/09/29 17:27:46 pst Exp $
d67 8
@


1.34
log
@Add nfs_client and amdflags
@
text
@d2 1
a2 1
#	$Id: rc,v 1.33 1994/09/26 16:52:04 pst Exp $
d21 2
a59 2

swapon -a
@


1.33
log
@Remove elvis editor preserve stuff.  We don't have elvis in 2.0 (nor am
I aware of anyone who wants it given that we have nvi).
@
text
@d2 1
a2 1
#	$Id: rc,v 1.32 1994/09/24 03:42:08 wollman Exp $
d199 1
a199 1
if grep nfs /etc/fstab > /dev/null ; then
d201 4
@


1.32
log
@Don't pass a filename to kvm_mkdb, it can figure out the correct file
on its own.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.31 1994/09/23 18:02:22 davidg Exp $
a124 6

# Recover elvis editor files.
echo preserving editor files
(cd /var/tmp && /usr/libexec/elvispreserve "-the system rebooted" elv* &&
	rm -f elvis[0-9a-f][0-9a-f][0-9a-f][0-9a-f]* \
	elvis_[0-9a-f][0-9a-f][0-9a-f][0-9a-f]*)
@


1.31
log
@root must be remounted read/write fairly early in the startup procedure
both for NFS diskless and for VFS LKMs.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.30 1994/09/23 07:16:16 rgrimes Exp $
d114 1
a114 1
kvm_mkdb /kernel
@


1.30
log
@fbtab: Pulled down from Attic, fixed spaces to tabs.

make.conf: Pulled in the following changes that had been commited
to share/examples/etc:
	----------------------------
	revision 1.6
	date: 1994/09/20 22:30:33;  author: adam;  state: Exp;  lines: +3 -3
	BOOTWAIT example converted to milliseconds calibration
	----------------------------
	revision 1.4
	date: 1994/09/19 21:35:28;  author: wollman;  state: Exp;  lines: +7 -1
	Document NO_SHARED_LIBCC_INT.
	----------------------------
	revision 1.3
	date: 1994/09/19 21:28:11;  author: wollman;  state: Exp;  lines: +12 -17
	Install /etc from the same source as /usr/share/examples/etc (mostly).
	----------------------------
	revision 1.2
	date: 1994/09/19 02:05:08;  author: ache;  state: Exp;  lines: +1 -11
	Remove STARTUP_LOCALE, obsoleted now
	----------------------------
	revision 1.1
	date: 1994/09/08 19:08:59;  author: jkh;  state: Exp;
	Add a sample make.conf.  Also document the new X11BASE variable, and
	expand some of the documentation for other entries.
	Submitted by:   jkh
	----------------------------

manpath.config: Pulled down from Attic, and merged share/examples/etc
changes.

rc: Pulled in the following change from share/examples/etc:
	----------------------------
	revision 1.2
	date: 1994/09/19 23:13:37;  author: ache;  state: Exp;  lines: +1 -2
	Remove warning about adjkerntz /var/run file
	----------------------------
@
text
@d2 1
a2 1
#	$Id: rc,v 1.2 1994/09/19 23:13:37 ache Exp $
d61 3
a63 5
# Check for diskless boot, and remount the root RW.
a=`mount`
if [ 0 != `expr "$a" : '^[^/]*:/.* on /'` ] ; then
        mount -u -o rw /
fi
@


1.29
log
@nfsiod should be started if this is a NFS-client, not if it is a server.

look for "nfs" in etc/fstab, and start it if we see it.  Not quite perfect,
but better.  mount_nfs should start it, if it isn't running.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.28 1994/08/21 04:28:44 davidg Exp $
a89 1
# don't add .[a-z]* to rm, because of .adjkerntz file name
@


1.28
log
@1) adapted to a world without "fastboot" and "fasthalt".
2) updated to work with 2.0/4.4 binaries.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.27 1994/06/06 17:45:37 phk Exp $
d206 3
@


1.27
log
@check for diskless boot, and remount / RW in that case.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.26 1994/06/05 16:03:57 ats Exp $
d21 1
a21 4
if [ -e /fastboot ]
then
	echo Fast boot ... skipping disk checks
elif [ $1x = autobootx ]
d53 2
a68 1
rm -f /fastboot		# XXX (root now writeable)
d117 1
a117 1
kvm_mkdb /386bsd
d205 2
a206 2
	echo -n ' nfsd';		nfsd -u 0,0,4 -t 0,0
	echo -n ' nfsiod';		nfsiod 4
@


1.26
log
@Comment out the startup of the xtend daemon by default.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.25 1994/06/04 00:43:59 ache Exp $
d61 6
@


1.25
log
@Now rc.serial used for initial setup of serial lines
@
text
@d2 1
a2 1
#	$Id: rc,v 1.24 1994/06/01 17:04:01 paul Exp $
d216 3
a218 3
if [ -x /usr/libexec/xtend ]; then
	echo -n ' xtend';   /usr/libexec/xtend
fi
@


1.24
log
@Added
     if [ -x /usr/libexec/xtend ]; then
          echo -n ' xtend';   /usr/libexec/xtend
     fi

to etc/rc
@
text
@d2 1
a2 1
#	$Id: rc,v 1.23 1994/05/23 11:22:10 ache Exp $
d71 6
@


1.23
log
@Path of uucp lock/temp corrected
@
text
@d2 1
a2 1
#	$Id: rc,v 1.22 1994/04/25 15:33:12 jkh Exp $
d209 4
@


1.22
log
@Fix to handle routed with multiple args from Andy J. Chichak.
This should go into 1.1 Release if it's not too late.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.21 1994/03/25 04:58:58 rich Exp $
d78 3
a80 3
rm -f /var/spool/uucp/LCK.*
rm -f /var/spool/uucp/STST/*
# don't add .[a-z]* to rm, because of .adjkerntz file
@


1.21
log
@Add /usr/X11R6/lib to the ldconfig path if it exists.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.20 1994/02/27 15:32:09 phk Exp $
d159 1
a159 1
elif [ X${routedflags} != X"NO" ]; then
@


1.20
log
@Added tickadj to start of xntpd, this improves performance to nominal.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.19 1994/02/21 11:28:45 rgrimes Exp $
d214 1
@


1.19
log
@Correction so that elvisrecover finds the right files!
>From: chmr@@edvz.tu-graz.ac.at (Christoph Robitschko)
Date: Fri, 21 Feb 1992 09:40:35 +0100 (MET)

The last version expected elvis* files in /var/tmp, while elvis puts
elv* files there.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.18 1994/02/21 03:16:43 rgrimes Exp $
a171 1
	echo -n 'starting more network daemons:'
d175 8
a182 1
	echo -n ' xntpd';	xntpd ${xntpdflags}
@


1.19.2.1
log
@Pull in rc changes from main branch about running tickadj for xntpd, and
update to services for KerberosIV vs KerberosV.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.20 1994/02/27 15:32:09 phk Exp $
d172 1
d176 1
a176 8
	if [ X"${tickadjflags}" != X"NO" ]; then
		echo 'adjusting kernel for xntpd'; tickadj ${tickadjflags--A}
	fi
	echo 'starting xntpd';	xntpd ${xntpdflags}
fi

if [ X"${ntpdate}" != X"NO" -o X"${xntpdflags}" != X"NO" ]; then
	echo -n 'starting more network daemons:'
@


1.19.2.2
log
@>From main branch:
----------------------------
revision 1.21
date: 1994/03/25 04:58:58;  author: rich;  state: Exp;  lines: +2 -1
Add /usr/X11R6/lib to the ldconfig path if it exists.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.19.2.1 1994/03/06 08:43:37 rgrimes Exp $
a213 1
	if [ -d /usr/X11R6/lib ]; then _LDC="${_LDC} /usr/X11R6/lib" ; fi
@


1.18
log
@Move ldconfig stuff to be after nfs mounts.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.17 1994/02/21 02:47:47 rgrimes Exp $
d121 1
a121 1
(cd /var/tmp && /usr/libexec/elvispreserve "-the system rebooted" elvis* &&
@


1.17
log
@Put back in elvis recovery stuff, we still ship elvis with 1.1 as a fall
back editor!

Add nvi recovery precedure from man page.

Fix ntpdate echo lines so that it looks pretty (ntpdate spits out 1 line
of output that makes the system boot up look real ugly if you do it
echo -n, so I chaged it to echo, and then added a
echo -n 'starting more network daemons:' so any addition daemon starts
look normal.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.16 1994/02/02 08:02:37 chmr Exp $
a82 11
# Make shared lib searching a little faster.  Leave /usr/lib first if you
# add your own entries or you may come to grief.
if [ -x /sbin/ldconfig ]; then
	_LDC=/usr/lib
	if [ -d /usr/X386/lib ]; then _LDC="${_LDC} /usr/X386/lib" ; fi
	if [ -d /usr/local/lib ]; then _LDC="${_LDC} /usr/local/lib" ; fi
	if [ -d /usr/gnu/lib ]; then _LDC="${_LDC} /usr/gnu/lib" ; fi
	echo 'setting ldconfig path:' ${_LDC}
	ldconfig ${_LDC}
fi

d203 11
@


1.16
log
@Use find -d to clear /tmp, to stop warnings.
Removed elvispreserve command, nvi does not use it, and it was also wrong
for elvis.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.15 1994/01/22 20:44:13 guido Exp $
d130 15
d182 2
a183 1
	echo -n ' ntpdate';	ntpdate $ntpdate
@


1.15
log
@This is Vixie cron 3.0. This version fixes all known security bugs.
Further it implements crontab -e.
I moved cron from /usr/libexec to /usr/sbin where most daemons are
that are run from rc. That also gets rid of the ugly path crond
used to have in ps(1) outputs. Further I renamed it to cron, as
Paul Vixie likes it and is done by NetBSD.

NOTE VERY WELL THE FOLLOWING:

1) Systems crontab changed. Every users crontab resides in /var/cron
   *EXCEPT* root's. This is a special crontab as it resides in
   /etc. Further it is the *ONLY* crontab file in which you specify
   usernames. See /usr/src/etc/crontab. This is also done by BSDI's
   BSD/386 as far as I know (they provided the patches for it anyway)
2) So you *must* delete root's crontab and reinstall the copy
   in /etc from /usr/src/etc.
   'Must' is to much: the old installed crontab will work but cron
   will also try to 'run' /etc/crontab.
3) Last but not least: cron's logging is now done via syslog. Note
   that logging by cron is done lowercase when it logs about itsself
   and uppercase when it logs user events, like installing a new crontab.
   The default logfile file is the same as before:
   	syslog.conf:cron.*	/var/cron/log

-Guido
@
text
@d2 1
a2 1
#	$Id: rc,v 1.14 1994/01/08 17:49:47 ache Exp $
a129 5
echo preserving editor files
(cd /var/tmp && /usr/libexec/elvispreserve "-the system rebooted" elvis* &&
     rm -f elvis[0-9a-f][0-9a-f][0-9a-f][0-9a-f]* \
	 elvis_[0-9a-f][0-9a-f][0-9a-f][0-9a-f]*)

d135 1
a135 1
    find . ! -name . ! -name lost+found ! -name quotas -exec rm -rf -- {} \;)
@


1.14
log
@Move "mount -a -t nfs" *after* network daemons,
must be at least after named & gated for proper name resolution.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.13 1994/01/04 18:06:18 ache Exp $
d145 1
a145 1
echo -n ' crond';		/usr/libexec/crond
@


1.13
log
@Add warning comment line (rm anything into /var/run)
@
text
@d2 1
a2 1
#	$Id: rc,v 1.12 1993/12/30 18:19:17 jkh Exp $
a75 2
mount -a -t nfs >/dev/null 2>&1 &	# XXX shouldn't need background

d201 2
@


1.12
log
@Added more robust ldconfig setting in rc, removed redundant ldconfig in
rc.local.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.11 1993/12/21 21:28:12 wollman Exp $
d82 1
@


1.11
log
@Support for automatically running ntpdate and xntpd.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.10 1993/12/21 02:58:15 ache Exp $
d84 2
d87 6
a92 1
	ldconfig /usr/X386/lib
@


1.10
log
@Fix sendmail_flags, long ago it was imported from /etc/netstart
with this bug.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.9 1993/12/17 04:20:30 ache Exp $
d160 11
@


1.9
log
@adjkerntz call added with explanation comment
@
text
@d2 1
a2 1
#	$Id: rc,v 1.8 1993/12/13 08:28:03 davidg Exp $
d178 1
a178 1
if [ X"${sendmail_flags}" = X"NO" -a -r /etc/sendmail.cf ]; then
@


1.8
log
@Moved startup of portmap to be the first network daemon.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.7 1993/11/30 16:59:27 rich Exp $
d65 6
@


1.7
log
@allow spaces in $sendmail_flags.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.6 1993/11/25 13:23:46 davidg Exp $
d138 5
a162 5

# Portmapper should always be run, to provide RPC services for inetd.
if [ -x /usr/sbin/portmap ]; then
	echo -n ' portmap';		portmap
fi
@


1.6
log
@Don't start update daemon; it's now internel to the kernel.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.5 1993/11/24 05:17:14 rich Exp $
d172 1
a172 1
if [ X${sendmail_flags} = X"NO" -a -r /etc/sendmail.cf ]; then
@


1.5
log
@/var/run is cleared on boot. Rerun 'ldconfig /usr/X386/lib' after
clearing /var/run if /sbin/ldconfig exists.
@
text
@d2 1
a2 1
#	$Id: rc,v 1.4 1993/11/07 01:19:06 wollman Exp $
a132 1
echo -n ' update';		update
@


1.4
log
@Added a new flag variable to /etc/netstart, $sendmail_flags, which
gives the flags to be passed to sendmail when it is started.  (If it is
"NO", sendmail is not started.)  Also, always start the portmapper regardless
of the value of $nfs_server; this should prevent the inetd complaints we
have seen from recurring.
@
text
@d2 1
a2 1
#	$Id$
d77 4
@


1.3
log
@Changed -r /fastboot to -e /fastboot.  File just needs to exist for fastboot.
Otherwise, doesn't work for non-root owner of /fastboot.
@
text
@d1 3
a3 1
#	@@(#)rc	5.27 (Berkeley) 6/5/91
d156 4
a161 1
	echo -n ' portmap';		portmap
d167 6
a172 1
echo -n ' sendmail';		sendmail -bd -q30m
@


1.2
log
@Removed the foreground/background escape sequences that cause headaches
if you are using a com console or a non pc3 console.
@
text
@d19 1
a19 1
if [ -r /fastboot ]
@


1.1
log
@Initial revision
@
text
@a8 2
# yellow characters with blue background
echo -n "[3;30x"
a169 2
# reset to normal (no colors)
echo -n "[0x"
@


1.1.1.1
log
@Initial import of 386BSD 0.1 othersrc/etc
@
text
@@


1.1.1.2
log
@Import the NetBSD 1.5 RC system on a vendor branch.
@
text
@d1 6
a6 26
#!/bin/sh
#
# $NetBSD: rc,v 1.152 2000/04/22 03:01:22 lukem Exp $
#
# rc.sh --
#	Run the scripts in /etc/rc.d with rcorder.

#	System startup script run by init on autoboot or after single-user.
#	Output and error are redirected to console by init, and the console
#	is the controlling terminal.

export HOME=/
export PATH=/sbin:/bin:/usr/sbin:/usr/bin

. /etc/rc.subr
. /etc/rc.conf

if ! checkyesno rc_configured; then
	echo "/etc/rc.conf is not configured.  Multiuser boot aborted."
	exit 1
fi

if [ "$1" = autoboot ]; then
	autoboot=yes
	_rc_fast_run=yes	# run_rc_command(): do fast booting
fi
d9 2
d12 2
a13 3
#	Set shell to ignore SIGINT (2), but not children;
#	shell catches SIGQUIT (3) and returns to single user.
#
d15 46
a60 1
trap "echo 'Boot interrupted.'; exit 1" 3
d62 33
a94 1
files=`rcorder -s nostart /etc/rc.d/*`
d96 73
a168 3
for i in $files; do
	run_rc_script $i start
done
d171 3
@

