head 1.175; access; symbols netbsd-10-0-RELEASE:1.175 netbsd-10-0-RC6:1.175 netbsd-10-0-RC5:1.175 netbsd-10-0-RC4:1.175 netbsd-10-0-RC3:1.175 netbsd-10-0-RC2:1.175 netbsd-10-0-RC1:1.175 netbsd-10:1.175.0.6 netbsd-10-base:1.175 netbsd-9-3-RELEASE:1.173 cjep_sun2x-base1:1.175 cjep_sun2x:1.175.0.4 cjep_sun2x-base:1.175 cjep_staticlib_x-base1:1.175 netbsd-9-2-RELEASE:1.173 cjep_staticlib_x:1.175.0.2 cjep_staticlib_x-base:1.175 netbsd-9-1-RELEASE:1.173 phil-wifi-20200421:1.173 phil-wifi-20200411:1.173 is-mlppp:1.173.0.16 is-mlppp-base:1.173 phil-wifi-20200406:1.173 netbsd-8-2-RELEASE:1.173 netbsd-9-0-RELEASE:1.173 netbsd-9-0-RC2:1.173 netbsd-9-0-RC1:1.173 phil-wifi-20191119:1.173 netbsd-9:1.173.0.14 netbsd-9-base:1.173 phil-wifi-20190609:1.173 netbsd-8-1-RELEASE:1.173 netbsd-8-1-RC1:1.173 pgoyette-compat-merge-20190127:1.173 pgoyette-compat-20190127:1.173 pgoyette-compat-20190118:1.173 pgoyette-compat-1226:1.173 pgoyette-compat-1126:1.173 pgoyette-compat-1020:1.173 pgoyette-compat-0930:1.173 pgoyette-compat-0906:1.173 netbsd-7-2-RELEASE:1.170 pgoyette-compat-0728:1.173 netbsd-8-0-RELEASE:1.173 phil-wifi:1.173.0.12 phil-wifi-base:1.173 pgoyette-compat-0625:1.173 netbsd-8-0-RC2:1.173 pgoyette-compat-0521:1.173 pgoyette-compat-0502:1.173 pgoyette-compat-0422:1.173 netbsd-8-0-RC1:1.173 pgoyette-compat-0415:1.173 pgoyette-compat-0407:1.173 pgoyette-compat-0330:1.173 pgoyette-compat-0322:1.173 pgoyette-compat-0315:1.173 netbsd-7-1-2-RELEASE:1.170 pgoyette-compat:1.173.0.10 pgoyette-compat-base:1.173 netbsd-7-1-1-RELEASE:1.170 matt-nb8-mediatek:1.173.0.8 matt-nb8-mediatek-base:1.173 perseant-stdc-iso10646:1.173.0.6 perseant-stdc-iso10646-base:1.173 netbsd-8:1.173.0.4 netbsd-8-base:1.173 prg-localcount2-base3:1.173 prg-localcount2-base2:1.173 prg-localcount2-base1:1.173 prg-localcount2:1.173.0.2 prg-localcount2-base:1.173 pgoyette-localcount-20170426:1.173 bouyer-socketcan-base1:1.173 pgoyette-localcount-20170320:1.172 netbsd-7-1:1.170.0.12 netbsd-7-1-RELEASE:1.170 netbsd-7-1-RC2:1.170 netbsd-7-nhusb-base-20170116:1.170 bouyer-socketcan:1.170.0.10 bouyer-socketcan-base:1.170 pgoyette-localcount-20170107:1.170 netbsd-7-1-RC1:1.170 pgoyette-localcount-20161104:1.170 netbsd-7-0-2-RELEASE:1.170 localcount-20160914:1.170 netbsd-7-nhusb:1.170.0.8 netbsd-7-nhusb-base:1.170 pgoyette-localcount-20160806:1.170 pgoyette-localcount-20160726:1.170 pgoyette-localcount:1.170.0.6 pgoyette-localcount-base:1.170 netbsd-7-0-1-RELEASE:1.170 netbsd-7-0:1.170.0.4 netbsd-7-0-RELEASE:1.170 netbsd-7-0-RC3:1.170 netbsd-7-0-RC2:1.170 netbsd-7-0-RC1:1.170 netbsd-5-2-3-RELEASE:1.162 netbsd-5-1-5-RELEASE:1.162 netbsd-6-0-6-RELEASE:1.166 netbsd-6-1-5-RELEASE:1.166 netbsd-7:1.170.0.2 netbsd-7-base:1.170 yamt-pagecache-base9:1.168 yamt-pagecache-tag8:1.166 netbsd-6-1-4-RELEASE:1.166 netbsd-6-0-5-RELEASE:1.166 tls-earlyentropy:1.166.0.20 tls-earlyentropy-base:1.170 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.166 riastradh-drm2-base3:1.166 netbsd-6-1-3-RELEASE:1.166 netbsd-6-0-4-RELEASE:1.166 netbsd-5-2-2-RELEASE:1.162 netbsd-5-1-4-RELEASE:1.162 netbsd-6-1-2-RELEASE:1.166 netbsd-6-0-3-RELEASE:1.166 netbsd-5-2-1-RELEASE:1.162 netbsd-5-1-3-RELEASE:1.162 netbsd-6-1-1-RELEASE:1.166 riastradh-drm2-base2:1.166 riastradh-drm2-base1:1.166 riastradh-drm2:1.166.0.12 riastradh-drm2-base:1.166 netbsd-6-1:1.166.0.18 netbsd-6-0-2-RELEASE:1.166 netbsd-6-1-RELEASE:1.166 khorben-n900:1.166.0.16 netbsd-6-1-RC4:1.166 netbsd-6-1-RC3:1.166 agc-symver:1.166.0.14 agc-symver-base:1.166 netbsd-6-1-RC2:1.166 netbsd-6-1-RC1:1.166 yamt-pagecache-base8:1.166 netbsd-5-2:1.162.0.52 netbsd-6-0-1-RELEASE:1.166 yamt-pagecache-base7:1.166 netbsd-5-2-RELEASE:1.162 netbsd-5-2-RC1:1.162 matt-nb6-plus-nbase:1.166 yamt-pagecache-base6:1.166 netbsd-6-0:1.166.0.10 netbsd-6-0-RELEASE:1.166 netbsd-6-0-RC2:1.166 tls-maxphys:1.166.0.8 tls-maxphys-base:1.170 matt-nb6-plus:1.166.0.6 matt-nb6-plus-base:1.166 netbsd-6-0-RC1:1.166 yamt-pagecache-base5:1.166 yamt-pagecache-base4:1.166 netbsd-6:1.166.0.4 netbsd-6-base:1.166 netbsd-5-1-2-RELEASE:1.162 netbsd-5-1-1-RELEASE:1.162 yamt-pagecache-base3:1.166 yamt-pagecache-base2:1.166 yamt-pagecache:1.166.0.2 yamt-pagecache-base:1.166 cherry-xenmp:1.165.0.4 cherry-xenmp-base:1.165 bouyer-quota2-nbase:1.165 bouyer-quota2:1.165.0.2 bouyer-quota2-base:1.165 matt-mips64-premerge-20101231:1.165 matt-nb5-mips64-premerge-20101231:1.162 matt-nb5-pq3:1.162.0.50 matt-nb5-pq3-base:1.162 netbsd-5-1:1.162.0.48 netbsd-5-1-RELEASE:1.162 netbsd-5-1-RC4:1.162 matt-nb5-mips64-k15:1.162 netbsd-5-1-RC3:1.162 netbsd-5-1-RC2:1.162 netbsd-5-1-RC1:1.162 netbsd-5-0-2-RELEASE:1.162 matt-nb5-mips64-premerge-20091211:1.162 matt-premerge-20091211:1.164 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.162 matt-nb4-mips64-k7-u2a-k9b:1.162 matt-nb5-mips64-u1-k1-k5:1.162 matt-nb5-mips64:1.162.0.46 netbsd-5-0-1-RELEASE:1.162 jym-xensuspend-nbase:1.163 netbsd-5-0:1.162.0.44 netbsd-5-0-RELEASE:1.162 netbsd-5-0-RC4:1.162 netbsd-5-0-RC3:1.162 netbsd-5-0-RC2:1.162 jym-xensuspend:1.162.0.42 jym-xensuspend-base:1.163 netbsd-5-0-RC1:1.162 mjf-devfs2-base2:1.162 netbsd-5:1.162.0.40 netbsd-5-base:1.162 matt-mips64-base2:1.162 matt-mips64:1.162.0.38 netbsd-4-0-1-RELEASE:1.162 wrstuden-revivesa-base-3:1.162 wrstuden-revivesa-base-2:1.162 wrstuden-fixsa-newbase:1.162 wrstuden-revivesa-base-1:1.162 yamt-pf42-base4:1.162 yamt-pf42-base3:1.162 hpcarm-cleanup-nbase:1.162 yamt-pf42-baseX:1.162 yamt-pf42-base2:1.162 wrstuden-revivesa:1.162.0.36 wrstuden-revivesa-base:1.162 yamt-pf42:1.162.0.34 yamt-pf42-base:1.162 mjf-devfs2:1.162.0.32 mjf-devfs2-base:1.162 keiichi-mipv6:1.162.0.30 keiichi-mipv6-base:1.162 mjf-devfs:1.162.0.28 mjf-devfs-base:1.162 matt-armv6-nbase:1.162 matt-armv6-prevmlocking:1.162 wrstuden-fixsa-base-1:1.162 netbsd-4-0:1.162.0.26 netbsd-4-0-RELEASE:1.162 cube-autoconf:1.162.0.24 cube-autoconf-base:1.162 netbsd-4-0-RC5:1.162 netbsd-4-0-RC4:1.162 netbsd-4-0-RC3:1.162 netbsd-4-0-RC2:1.162 netbsd-4-0-RC1:1.162 matt-armv6:1.162.0.22 matt-armv6-base:1.162 matt-mips64-base:1.162 hpcarm-cleanup:1.162.0.20 hpcarm-cleanup-base:1.162 netbsd-3-1-1-RELEASE:1.162 netbsd-3-0-3-RELEASE:1.162 wrstuden-fixsa:1.162.0.18 wrstuden-fixsa-base:1.162 abandoned-netbsd-4-base:1.162 abandoned-netbsd-4:1.162.0.12 netbsd-3-1:1.162.0.14 netbsd-3-1-RELEASE:1.162 netbsd-3-0-2-RELEASE:1.162 netbsd-3-1-RC4:1.162 netbsd-3-1-RC3:1.162 netbsd-3-1-RC2:1.162 netbsd-3-1-RC1:1.162 netbsd-4:1.162.0.16 netbsd-4-base:1.162 netbsd-3-0-1-RELEASE:1.162 netbsd-3-0:1.162.0.10 netbsd-3-0-RELEASE:1.162 netbsd-3-0-RC6:1.162 netbsd-3-0-RC5:1.162 netbsd-3-0-RC4:1.162 netbsd-3-0-RC3:1.162 netbsd-3-0-RC2:1.162 netbsd-3-0-RC1:1.162 netbsd-2-0-3-RELEASE:1.162 netbsd-2-1:1.162.0.8 netbsd-2-1-RELEASE:1.162 netbsd-2-1-RC6:1.162 netbsd-2-1-RC5:1.162 netbsd-2-1-RC4:1.162 netbsd-2-1-RC3:1.162 netbsd-2-1-RC2:1.162 netbsd-2-1-RC1:1.162 netbsd-2-0-2-RELEASE:1.162 netbsd-3:1.162.0.6 netbsd-3-base:1.162 netbsd-2-0-1-RELEASE:1.162 netbsd-2:1.162.0.4 netbsd-2-base:1.162 netbsd-2-0-RELEASE:1.162 netbsd-2-0-RC5:1.162 netbsd-2-0-RC4:1.162 netbsd-2-0-RC3:1.162 netbsd-2-0-RC2:1.162 netbsd-2-0-RC1:1.162 netbsd-2-0:1.162.0.2 netbsd-2-0-base:1.162 netbsd-1-6-PATCH002-RELEASE:1.161 netbsd-1-6-PATCH002:1.161 netbsd-1-6-PATCH002-RC4:1.161 netbsd-1-6-PATCH002-RC3:1.161 netbsd-1-6-PATCH002-RC2:1.161 netbsd-1-6-PATCH002-RC1:1.161 netbsd-1-6-PATCH001:1.161 netbsd-1-6-PATCH001-RELEASE:1.161 netbsd-1-6-PATCH001-RC3:1.161 netbsd-1-6-PATCH001-RC2:1.161 netbsd-1-6-PATCH001-RC1:1.161 fvdl_fs64_base:1.161 netbsd-1-6-RELEASE:1.161 netbsd-1-6-RC3:1.161 netbsd-1-6-RC2:1.161 netbsd-1-6-RC1:1.161 netbsd-1-6:1.161.0.2 netbsd-1-6-base:1.161 netbsd-1-5-PATCH003:1.152.4.1 netbsd-1-5-PATCH002:1.152.4.1 netbsd-1-5-PATCH001:1.152.4.1 netbsd-1-5-RELEASE:1.152.4.1 netbsd-1-5-BETA2:1.152.4.1 netbsd-1-5-BETA:1.152.4.1 netbsd-1-4-PATCH003:1.124.2.2 netbsd-1-5-ALPHA2:1.152 netbsd-1-5:1.152.0.4 netbsd-1-5-base:1.152 minoura-xpg4dl:1.152.0.2 minoura-xpg4dl-base:1.152 netbsd-1-4-PATCH002:1.124.2.2 wrstuden-devbsize-19991221:1.138 wrstuden-devbsize:1.131.0.2 wrstuden-devbsize-base:1.138 comdex-fall-1999:1.135.0.2 comdex-fall-1999-base:1.135 netbsd-1-4-PATCH001:1.124.2.1 netbsd-1-4-RELEASE:1.124.2.1 netbsd-1-4:1.124.0.2 netbsd-1-4-base:1.124 netbsd-1-3-PATCH003:1.95.2.2 netbsd-1-3-PATCH003-CANDIDATE2:1.95.2.2 netbsd-1-3-PATCH003-CANDIDATE1:1.95.2.2 netbsd-1-3-PATCH003-CANDIDATE0:1.95.2.2 netbsd-1-3-PATCH002:1.95.2.2 netbsd-1-3-PATCH001:1.95.2.2 netbsd-1-3-RELEASE:1.95.2.2 netbsd-1-3-BETA:1.95.2.2 netbsd-1-3:1.95.0.2 netbsd-1-3-base:1.95 netbsd-1-2-PATCH001:1.57 lite-2:1.1.1.2 lite-1:1.1.1.2 CSRG:1.1.1 netbsd-1-2-RELEASE:1.57 netbsd-1-2-BETA:1.57 netbsd-1-2-base:1.57 netbsd-1-2:1.57.0.4 netbsd-1-1-PATCH001:1.54 netbsd-1-1-RELEASE:1.54 netbsd-1-1:1.54.0.2 netbsd-1-1-base:1.54 netbsd-1-0-PATCH06:1.47 netbsd-1-0-PATCH05:1.47 netbsd-1-0-PATCH04:1.47 netbsd-1-0-PATCH03:1.47 netbsd-1-0-PATCH02:1.47 netbsd-1-0-PATCH1:1.47 netbsd-1-0-PATCH0:1.47 netbsd-1-0-RELEASE:1.47 netbsd-1-0:1.47.0.2 netbsd-1-0-base:1.47 netbsd-0-9-RELEASE:1.14 netbsd-0-9-BETA:1.14 netbsd-0-9-ALPHA2:1.14 netbsd-0-9-ALPHA:1.14 netbsd-0-9:1.14.0.2 netbsd-0-9-base:1.14 netbsd-0-8:1.9 netbsd-alpha-1:1.9 patchkit-0-2-2:1.1.1.1 WFJ-386bsd-01:1.1.1.1 WFJ-920714:1.1.1; locks; strict; comment @# @; 1.175 date 2020.09.08.16.10.53; author martin; state Exp; branches; next 1.174; commitid P8Nfyq8SdZmnignC; 1.174 date 2020.07.22.16.50.41; author martin; state Exp; branches; next 1.173; commitid ZlFyZCKhX3U036hC; 1.173 date 2017.03.20.16.02.48; author christos; state Exp; branches; next 1.172; commitid MC8UVihAz3bA0jKz; 1.172 date 2017.02.02.20.49.55; author christos; state Exp; branches; next 1.171; commitid N4fZAzE97jBT4qEz; 1.171 date 2017.02.02.20.01.36; author christos; state Exp; branches; next 1.170; commitid EEzAsPeRnQShOpEz; 1.170 date 2014.07.29.20.39.16; author apb; state Exp; branches 1.170.6.1 1.170.10.1; next 1.169; commitid jX4PSCrMmDQAyjKx; 1.169 date 2014.07.27.07.46.46; author apb; state Exp; branches; next 1.168; commitid zT2BjhOZVTAxlZJx; 1.168 date 2014.04.09.12.45.05; author apb; state Exp; branches; next 1.167; commitid dMtUy7Vy2Qhtt0wx; 1.167 date 2014.04.09.12.38.09; author apb; state Exp; branches; next 1.166; commitid MXK8TsKxXU0Is0wx; 1.166 date 2011.08.11.22.52.47; author apb; state Exp; branches 1.166.2.1 1.166.8.1 1.166.20.1; next 1.165; 1.165 date 2010.06.04.18.42.54; author christos; state Exp; branches; next 1.164; 1.164 date 2009.09.11.18.17.04; author apb; state Exp; branches; next 1.163; 1.163 date 2009.04.10.16.18.04; author joerg; state Exp; branches; next 1.162; 1.162 date 2003.01.04.15.27.43; author lukem; state Exp; branches 1.162.42.1; next 1.161; 1.161 date 2002.05.19.01.01.32; author lukem; state Exp; branches; next 1.160; 1.160 date 2002.04.18.07.18.05; author lukem; state Exp; branches; next 1.159; 1.159 date 2002.03.22.04.16.38; author lukem; state Exp; branches; next 1.158; 1.158 date 2001.06.14.07.50.06; author lukem; state Exp; branches; next 1.157; 1.157 date 2001.05.09.16.53.45; author lukem; state Exp; branches; next 1.156; 1.156 date 2001.03.12.15.56.39; author lukem; state Exp; branches; next 1.155; 1.155 date 2001.02.28.16.49.18; author lukem; state Exp; branches; next 1.154; 1.154 date 2000.12.15.00.00.09; author lukem; state Exp; branches; next 1.153; 1.153 date 2000.08.21.23.09.50; author lukem; state Exp; branches; next 1.152; 1.152 date 2000.04.22.03.01.22; author lukem; state Exp; branches 1.152.4.1; next 1.151; 1.151 date 2000.04.19.04.26.22; author simonb; state Exp; branches; next 1.150; 1.150 date 2000.03.29.02.13.51; author enami; state Exp; branches; next 1.149; 1.149 date 2000.03.10.13.15.58; author lukem; state Exp; branches; next 1.148; 1.148 date 2000.03.07.14.33.13; author jdolecek; state Exp; branches; next 1.147; 1.147 date 2000.02.09.16.24.03; author itojun; state Exp; branches; next 1.146; 1.146 date 2000.02.05.17.02.42; author itojun; state Exp; branches; next 1.145; 1.145 date 2000.01.31.12.47.29; author jdc; state Exp; branches; next 1.144; 1.144 date 2000.01.19.12.00.49; author tron; state Exp; branches; next 1.143; 1.143 date 2000.01.19.03.52.12; author enami; state Exp; branches; next 1.142; 1.142 date 2000.01.07.05.53.21; author enami; state Exp; branches; next 1.141; 1.141 date 2000.01.07.05.25.45; author enami; state Exp; branches; next 1.140; 1.140 date 2000.01.07.05.11.43; author enami; state Exp; branches; next 1.139; 1.139 date 2000.01.04.05.20.51; author lukem; state Exp; branches; next 1.138; 1.138 date 99.11.23.15.12.43; author hubertf; state Exp; branches; next 1.137; 1.137 date 99.11.23.08.05.04; author lukem; state Exp; branches; next 1.136; 1.136 date 99.11.15.20.04.50; author fvdl; state Exp; branches; next 1.135; 1.135 date 99.10.30.12.35.30; author frueauf; state Exp; branches; next 1.134; 1.134 date 99.10.05.10.54.27; author darrenr; state Exp; branches; next 1.133; 1.133 date 99.10.05.10.32.56; author darrenr; state Exp; branches; next 1.132; 1.132 date 99.09.28.14.53.17; author bouyer; state Exp; branches; next 1.131; 1.131 date 99.09.16.11.00.44; author darrenr; state Exp; branches 1.131.2.1; next 1.130; 1.130 date 99.09.03.13.40.15; author itojun; state Exp; branches; next 1.129; 1.129 date 99.08.28.03.39.59; author christos; state Exp; branches; next 1.128; 1.128 date 99.08.05.20.51.57; author christos; state Exp; branches; next 1.127; 1.127 date 99.07.03.03.29.29; author itojun; state Exp; branches; next 1.126; 1.126 date 99.06.30.06.48.05; author augustss; state Exp; branches; next 1.125; 1.125 date 99.04.13.07.40.53; author tron; state Exp; branches; next 1.124; 1.124 date 99.04.01.03.58.44; author cjs; state Exp; branches 1.124.2.1; next 1.123; 1.123 date 99.03.26.13.45.47; author drochner; state Exp; branches; next 1.122; 1.122 date 99.03.26.13.10.17; author sommerfe; state Exp; branches; next 1.121; 1.121 date 99.03.26.01.11.45; author oster; state Exp; branches; next 1.120; 1.120 date 99.03.24.18.59.47; author mellon; state Exp; branches; next 1.119; 1.119 date 99.03.19.00.35.44; author perry; state Exp; branches; next 1.118; 1.118 date 99.03.17.15.49.47; author drochner; state Exp; branches; next 1.117; 1.117 date 99.03.14.14.04.40; author drochner; state Exp; branches; next 1.116; 1.116 date 99.02.07.14.56.01; author frueauf; state Exp; branches; next 1.115; 1.115 date 99.02.07.00.47.08; author bad; state Exp; branches; next 1.114; 1.114 date 99.02.06.23.22.31; author frueauf; state Exp; branches; next 1.113; 1.113 date 99.02.01.00.34.25; author mrg; state Exp; branches; next 1.112; 1.112 date 99.01.31.08.46.58; author mrg; state Exp; branches; next 1.111; 1.111 date 99.01.12.12.42.46; author mrg; state Exp; branches; next 1.110; 1.110 date 99.01.12.04.58.37; author jwise; state Exp; branches; next 1.109; 1.109 date 99.01.11.21.04.38; author jwise; state Exp; branches; next 1.108; 1.108 date 99.01.06.03.41.44; author abs; state Exp; branches; next 1.107; 1.107 date 99.01.04.00.49.36; author tron; state Exp; branches; next 1.106; 1.106 date 98.11.21.03.00.38; author hubertf; state Exp; branches; next 1.105; 1.105 date 98.07.12.19.51.55; author augustss; state Exp; branches; next 1.104; 1.104 date 98.06.21.16.38.38; author tron; state Exp; branches; next 1.103; 1.103 date 98.04.07.04.47.33; author mrg; state Exp; branches; next 1.102; 1.102 date 98.02.24.00.24.45; author lukem; state Exp; branches; next 1.101; 1.101 date 98.02.23.05.20.52; author lukem; state Exp; branches; next 1.100; 1.100 date 98.01.26.12.02.50; author lukem; state Exp; branches; next 1.99; 1.99 date 98.01.24.19.12.55; author veego; state Exp; branches; next 1.98; 1.98 date 98.01.09.21.57.17; author perry; state Exp; branches; next 1.97; 1.97 date 97.11.23.04.17.57; author mrg; state Exp; branches; next 1.96; 1.96 date 97.11.11.02.28.58; author jonathan; state Exp; branches; next 1.95; 1.95 date 97.10.10.09.37.54; author drochner; state Exp; branches 1.95.2.1; next 1.94; 1.94 date 97.10.07.12.11.48; author lukem; state Exp; branches; next 1.93; 1.93 date 97.09.12.10.36.04; author drochner; state Exp; branches; next 1.92; 1.92 date 97.09.12.09.53.08; author drochner; state Exp; branches; next 1.91; 1.91 date 97.09.08.02.34.44; author mikel; state Exp; branches; next 1.90; 1.90 date 97.08.29.09.33.34; author veego; state Exp; branches; next 1.89; 1.89 date 97.08.29.02.24.05; author cjs; state Exp; branches; next 1.88; 1.88 date 97.08.26.19.35.33; author thorpej; state Exp; branches; next 1.87; 1.87 date 97.08.05.03.32.51; author cjs; state Exp; branches; next 1.86; 1.86 date 97.08.03.22.24.20; author perry; state Exp; branches; next 1.85; 1.85 date 97.07.31.03.35.39; author perry; state Exp; branches; next 1.84; 1.84 date 97.07.15.11.19.20; author veego; state Exp; branches; next 1.83; 1.83 date 97.07.14.11.55.44; author drochner; state Exp; branches; next 1.82; 1.82 date 97.07.11.12.01.06; author veego; state Exp; branches; next 1.81; 1.81 date 97.07.11.09.06.59; author veego; state Exp; branches; next 1.80; 1.80 date 97.07.10.13.43.14; author drochner; state Exp; branches; next 1.79; 1.79 date 97.06.25.23.30.28; author thorpej; state Exp; branches; next 1.78; 1.78 date 97.06.12.15.18.58; author mrg; state Exp; branches; next 1.77; 1.77 date 97.05.11.05.08.16; author cjs; state Exp; branches; next 1.76; 1.76 date 97.04.29.04.58.38; author scottr; state Exp; branches; next 1.75; 1.75 date 97.04.27.23.17.56; author perry; state Exp; branches; next 1.74; 1.74 date 97.04.23.01.24.22; author perry; state Exp; branches; next 1.73; 1.73 date 97.04.19.03.10.57; author perry; state Exp; branches; next 1.72; 1.72 date 97.03.17.00.05.12; author cjs; state Exp; branches; next 1.71; 1.71 date 97.03.12.19.21.26; author mycroft; state Exp; branches; next 1.70; 1.70 date 97.03.12.19.15.16; author mycroft; state Exp; branches; next 1.69; 1.69 date 97.03.10.10.15.11; author mycroft; state Exp; branches; next 1.68; 1.68 date 97.03.10.09.34.59; author mycroft; state Exp; branches; next 1.67; 1.67 date 97.03.10.09.16.13; author mycroft; state Exp; branches; next 1.66; 1.66 date 97.03.10.06.32.37; author scottr; state Exp; branches; next 1.65; 1.65 date 97.02.15.10.02.25; author mikel; state Exp; branches; next 1.64; 1.64 date 97.02.07.08.59.18; author mrg; state Exp; branches; next 1.63; 1.63 date 97.01.05.12.01.55; author mrg; state Exp; branches; next 1.62; 1.62 date 96.12.04.12.55.33; author mrg; state Exp; branches; next 1.61; 1.61 date 96.10.03.07.11.35; author mrg; state Exp; branches; next 1.60; 1.60 date 96.08.26.06.02.21; author tls; state Exp; branches; next 1.59; 1.59 date 96.08.09.16.07.42; author thorpej; state Exp; branches; next 1.58; 1.58 date 96.08.09.10.29.48; author thorpej; state Exp; branches; next 1.57; 1.57 date 96.03.22.03.20.53; author mrg; state Exp; branches; next 1.56; 1.56 date 96.03.22.00.44.59; author mrg; state Exp; branches; next 1.55; 1.55 date 95.12.30.01.30.05; author thorpej; state Exp; branches; next 1.54; 1.54 date 95.10.08.18.11.43; author thorpej; state Exp; branches; next 1.53; 1.53 date 95.09.16.15.29.20; author jtc; state Exp; branches; next 1.52; 1.52 date 95.09.02.17.30.43; author thorpej; state Exp; branches; next 1.51; 1.51 date 95.09.02.17.19.22; author thorpej; state Exp; branches; next 1.50; 1.50 date 95.08.27.20.30.53; author thorpej; state Exp; branches; next 1.49; 1.49 date 94.11.04.13.27.32; author briggs; state Exp; branches; next 1.48; 1.48 date 94.09.16.23.38.01; author mycroft; state Exp; branches; next 1.47; 1.47 date 94.06.27.21.14.19; author deraadt; state Exp; branches; next 1.46; 1.46 date 94.06.24.07.51.59; author deraadt; state Exp; branches; next 1.45; 1.45 date 94.06.18.06.38.54; author cgd; state Exp; branches; next 1.44; 1.44 date 94.06.08.18.47.45; author mycroft; state Exp; branches; next 1.43; 1.43 date 94.06.03.05.02.10; author jtc; state Exp; branches; next 1.42; 1.42 date 94.05.29.19.10.22; author mycroft; state Exp; branches; next 1.41; 1.41 date 94.05.29.03.37.33; author jtc; state Exp; branches; next 1.40; 1.40 date 94.04.10.06.42.40; author cgd; state Exp; branches; next 1.39; 1.39 date 94.03.28.05.47.28; author cgd; state Exp; branches; next 1.38; 1.38 date 94.03.18.00.58.20; author cgd; state Exp; branches; next 1.37; 1.37 date 94.03.17.23.22.40; author cgd; state Exp; branches; next 1.36; 1.36 date 94.03.14.04.14.19; author cgd; state Exp; branches; next 1.35; 1.35 date 94.03.09.04.02.58; author cgd; state Exp; branches; next 1.34; 1.34 date 94.02.26.03.29.27; author cgd; state Exp; branches; next 1.33; 1.33 date 94.02.01.00.36.34; author cgd; state Exp; branches; next 1.32; 1.32 date 94.01.30.17.15.52; author mycroft; state Exp; branches; next 1.31; 1.31 date 94.01.13.18.43.50; author jtc; state Exp; branches; next 1.30; 1.30 date 94.01.10.16.57.26; author mycroft; state Exp; branches; next 1.29; 1.29 date 94.01.10.16.43.08; author mycroft; state Exp; branches; next 1.28; 1.28 date 94.01.05.21.35.25; author jtc; state Exp; branches; next 1.27; 1.27 date 94.01.05.06.34.56; author deraadt; state Exp; branches; next 1.26; 1.26 date 93.12.16.04.02.24; author deraadt; state Exp; branches; next 1.25; 1.25 date 93.12.15.07.24.31; author mycroft; state Exp; branches; next 1.24; 1.24 date 93.12.01.01.38.21; author cgd; state Exp; branches; next 1.23; 1.23 date 93.11.26.20.11.44; author mycroft; state Exp; branches; next 1.22; 1.22 date 93.11.21.21.06.46; author mycroft; state Exp; branches; next 1.21; 1.21 date 93.11.17.09.20.43; author cgd; state Exp; branches; next 1.20; 1.20 date 93.11.17.09.19.35; author cgd; state Exp; branches; next 1.19; 1.19 date 93.11.07.10.36.48; author cgd; state Exp; branches; next 1.18; 1.18 date 93.10.20.00.13.46; author cgd; state Exp; branches; next 1.17; 1.17 date 93.09.05.23.12.36; author mycroft; state Exp; branches; next 1.16; 1.16 date 93.09.01.09.43.33; author deraadt; state Exp; branches; next 1.15; 1.15 date 93.08.25.02.44.12; author brezak; state Exp; branches; next 1.14; 1.14 date 93.06.11.00.39.33; author brezak; state Exp; branches; next 1.13; 1.13 date 93.05.03.10.52.21; author cgd; state Exp; branches; next 1.12; 1.12 date 93.05.03.04.19.40; author cgd; state Exp; branches; next 1.11; 1.11 date 93.04.28.06.40.01; author cgd; state Exp; branches; next 1.10; 1.10 date 93.04.28.05.39.57; author cgd; state Exp; branches; next 1.9; 1.9 date 93.04.10.20.15.32; author glass; state Exp; branches; next 1.8; 1.8 date 93.04.10.18.01.31; author cgd; state Exp; branches; next 1.7; 1.7 date 93.04.10.11.24.37; author glass; state Exp; branches; next 1.6; 1.6 date 93.04.09.19.13.21; author cgd; state Exp; branches; next 1.5; 1.5 date 93.04.05.04.01.06; author cgd; state Exp; branches; next 1.4; 1.4 date 93.04.05.03.55.14; author cgd; state Exp; branches; next 1.3; 1.3 date 93.04.04.18.59.12; author cgd; state Exp; branches; next 1.2; 1.2 date 93.04.02.08.00.07; author cgd; state Exp; branches; next 1.1; 1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches 1.1.1.1; next ; 1.170.6.1 date 2017.03.20.06.52.12; author pgoyette; state Exp; branches; next 1.170.6.2; commitid jjw7cAwgyKq7RfKz; 1.170.6.2 date 2017.04.26.02.52.18; author pgoyette; state Exp; branches; next ; commitid ojV02aOSdzvBqZOz; 1.170.10.1 date 2017.04.21.16.51.17; author bouyer; state Exp; branches; next ; commitid dUG7nkTKALCadqOz; 1.166.2.1 date 2014.05.22.11.27.18; author yamt; state Exp; branches; next ; commitid spVi6gj5ReXSGwBx; 1.166.8.1 date 2014.08.19.23.45.50; author tls; state Exp; branches; next ; commitid jTnpym9Qu0o4R1Nx; 1.166.20.1 date 2014.08.10.07.03.06; author tls; state Exp; branches; next ; commitid AUhmcW8XWqOOEMLx; 1.162.42.1 date 2009.05.13.19.18.02; author jym; state Exp; branches; next ; 1.152.4.1 date 2000.08.23.12.05.17; author lukem; state Exp; branches; next ; 1.131.2.1 date 99.12.27.18.28.50; author wrstuden; state Exp; branches; next ; 1.124.2.1 date 99.04.13.18.25.07; author tron; state Exp; branches; next 1.124.2.2; 1.124.2.2 date 99.08.29.11.21.02; author he; state Exp; branches; next ; 1.95.2.1 date 97.11.13.00.04.15; author mellon; state Exp; branches; next 1.95.2.2; 1.95.2.2 date 97.11.28.19.52.48; author mellon; state Exp; branches; next ; 1.1.1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 97.02.15.05.27.51; author mikel; state Exp; branches; next ; desc @@ 1.175 log @Ooops, overlooked one MOUNTCRITLOCAL reference in the rename to CRITLOCALMOUNTED. @ text @#!/bin/sh # # $NetBSD: rc,v 1.174 2020/07/22 16:50:41 martin Exp $ # # rc -- # Run the scripts in /etc/rc.d with rcorder, and log output # to /var/run/rc.log. # System startup script run by init(8) 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 umask 022 if [ -e ./rc.subr ] ; then . ./rc.subr # for testing else . /etc/rc.subr fi . /etc/rc.conf _rc_conf_loaded=true : ${RC_LOG_FILE:="/var/run/rc.log"} # rc.subr redefines echo and printf. Undo that here. unset echo ; unalias echo unset printf ; unalias printf 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=yes # run_rc_command(): do fast booting fi # # Completely ignore INT and QUIT at the outer level. The rc_real_work() # function should do something different. # trap '' INT QUIT # # This string will be used to mark lines of meta-data sent over the pipe # from the rc_real_work() function to the rc_postprocess() function. Lines # not so marked are assumed to be output from rc.d scripts. # # This string is long and unique to ensure that it does not accidentally # appear in output from any rc.d script. It must not contain any # characters that are special to glob expansion ('*', '?', '[', or ']'). # rc_metadata_prefix="$0:$$:metadata:"; # Child scripts may sometimes want to print directly to the original # stdout and stderr, bypassing the pipe to the postprocessor. These # _rc_*_fd variables are private, shared with /etc/rc.subr, but not # intended to be used directly by child scripts. (Child scripts # may use rc.subr's no_rc_postprocess function.) # _rc_original_stdout_fd=7; export _rc_original_stdout_fd _rc_original_stderr_fd=8; export _rc_original_stderr_fd eval "exec ${_rc_original_stdout_fd}>&1" eval "exec ${_rc_original_stderr_fd}>&2" fdflags -s +cloexec 7 8 # # rc_real_work # Do the real work. Output from this function will be piped into # rc_postprocess(), and some of the output will be marked as # metadata. # # The body of this function is defined using (...), not {...}, to force # it to run in a subshell. # rc_real_work() ( stty status '^T' # print_rc_metadata() wants to be able to print to the pipe # that goes to our postprocessor, even if its in a context # with redirected output. # _rc_postprocessor_fd=9 ; export _rc_postprocessor_fd _rc_pid=$$ ; export _rc_pid eval "exec ${_rc_postprocessor_fd}>&1" fdflags -s +cloexec 9 # Print a metadata line when we exit # trap 'es=$?; print_rc_metadata "exit:$es"; trap "" 0; exit $es' 0 # Set shell to ignore SIGINT, but children will not ignore it. # Shell catches SIGQUIT and returns to single user. # trap : INT trap '_msg="Boot interrupted at $(date)"; print_rc_metadata "interrupted:${_msg}"; exit 1' QUIT print_rc_metadata "start:$(date)" # # The stop_boot() function in rc.subr may kill $RC_PID. We want # it to kill the subshell running this rc_real_work() function, # rather than killing the parent shell, because we want the # rc_postprocess() function to be able to log the error # without being killed itself. # # "$$" is the pid of the top-level shell, not the pid of the # subshell that's executing this function. The command below # tentatively assumes that the parent of the "/bin/sh -c ..." # process will be the current subshell, and then uses "kill -0 # ..." to check the result. If the "/bin/sh -c ..." process # fails, or returns the pid of an ephemeral process that exits # before the "kill" command, then we fall back to using "$$". # RC_PID=$(/bin/sh -c 'ps -p $$ -o ppid=') || RC_PID=$$ kill -0 $RC_PID >/dev/null 2>&1 || RC_PID=$$ # # As long as process $RC_PID is still running, send a "nop" # metadata message to the postprocessor every few seconds. # This should help flush partial lines that may appear when # rc.d scripts that are NOT marked with "KEYWORD: interactive" # nevertheless attempt to print prompts and wait for input. # ( # First detach from tty, to avoid intercepting SIGINFO. eval "exec ${_rc_original_stdout_fd}<&-" eval "exec ${_rc_original_stderr_fd}<&-" exec /dev/null 2>&1 while kill -0 $RC_PID ; do print_rc_metadata "nop" sleep 3 done ) & # # Get a list of all rc.d scripts, and use rcorder to choose # what order to execute them. # # For testing, allow RC_FILES_OVERRIDE from the environment to # override this. # print_rc_metadata "cmd-name:rcorder" scripts=$(for rcd in ${rc_directories:-/etc/rc.d}; do test -d ${rcd} && echo ${rcd}/*; done) files=$(rcorder -s nostart ${rc_rcorder_flags} ${scripts}) print_rc_metadata "cmd-status:rcorder:$?" if [ -n "${RC_FILES_OVERRIDE}" ]; then files="${RC_FILES_OVERRIDE}" fi # # Run the scripts in order. # for _rc_elem in $files; do print_rc_metadata "cmd-name:$_rc_elem" run_rc_script $_rc_elem start print_rc_metadata "cmd-status:$_rc_elem:$?" done print_rc_metadata "end:$(date)" exit 0 ) # # rc_postprocess # Post-process the output from the rc_real_work() function. For # each line of input, we have to decide whether to print the line # to the console, print a twiddle on the console, print a line to # the log, or some combination of these. # # If rc_silent is true, then suppress most output, instead running # rc_silent_cmd (typically "twiddle") for each line. # # The body of this function is defined using (...), not {...}, to force # it to run in a subshell. # # We have to deal with the following constraints: # # * There may be no writable file systems early in the boot, so # any use of temporary files would be problematic. # # * Scripts run during the boot may clear /tmp and/var/run, so even # if they are writable, using those directories too early may be # problematic. We assume that it's safe to write to our log file # after the CRITLOCALMOUNTED script has run. # # * /usr/bin/tee cannot be used because the /usr file system may not # be mounted early in the boot. # # * All calls to the rc_log_message and rc_log_flush functions must be # from the same subshell, otherwise the use of a shell variable to # buffer log messages will fail. # rc_postprocess() ( local line local before after local IFS='' # Try quite hard to flush the log to disk when we exit. trap 'es=$?; rc_log_flush FORCE; trap "" 0; exit $es' 0 yesno_to_truefalse rc_silent 2>/dev/null while read -r line ; do case "$line" in "${rc_metadata_prefix}"*) after="${line#*"${rc_metadata_prefix}"}" rc_postprocess_metadata "${after}" ;; *"${rc_metadata_prefix}"*) # magic string is present, but not at the start of # the line. Treat it as a partial line of # ordinary data, followed by a line of metadata. before="${line%"${rc_metadata_prefix}"*}" rc_postprocess_partial_line "${before}" after="${line#*"${rc_metadata_prefix}"}" rc_postprocess_metadata "${after}" ;; *) rc_postprocess_plain_line "${line}" ;; esac done # If we get here, then the rc_real_work() function must have # exited uncleanly. A clean exit would have been accompanied by # a line of metadata that would have prevented us from getting # here. # exit 1 ) # # rc_postprocess_plain_line string # $1 is a string representing a line of output from one of the # rc.d scripts. Append the line to the log, and also either # display the line on the console, or run $rc_silent_cmd, # depending on the value of $rc_silent. # rc_postprocess_plain_line() { local line="$1" rc_log_message "${line}" if $rc_silent; then eval "$rc_silent_cmd" else printf "%s\n" "${line}" fi } # # rc_postprocess_partial_line string # This is just like rc_postprocess_plain_line, except that # a newline is not appended to the string. # rc_postprocess_partial_line() { local line="$1" rc_log_message_n "${line}" if $rc_silent; then eval "$rc_silent_cmd" else printf "%s" "${line}" fi } # # rc_postprocess_metadata string # $1 is a string containing metadata from the rc_real_work() # function. The rc_metadata_prefix marker should already # have been removed before the string is passed to this function. # Take appropriate action depending on the content of the string. # rc_postprocess_metadata() { local metadata="$1" local keyword args local msg local IFS=':' # given metadata="bleep:foo bar:baz", # set keyword="bleep", args="foo bar:baz", # $1="foo bar", $2="baz" # keyword="${metadata%%:*}" args="${metadata#*:}" set -- $args case "$keyword" in start) # Marks the start of the entire /etc/rc script. # $args contains a date/time. rc_log_message "[$0 starting at $args]" if ! $rc_silent; then printf "%s\n" "$args" fi ;; cmd-name) # Marks the start of a child script (usually one of # the /etc/rc.d/* scripts). rc_log_message "[running $1]" ;; cmd-status) # Marks the end of a child script. # $1 is a command name, $2 is the command's exit status. # If the command failed, report it, and add it to a list. if [ "$2" != 0 ]; then rc_failures="${rc_failures}${rc_failures:+ }$1" msg="$1 $(human_exit_code $2)" rc_log_message "$msg" if ! $rc_silent; then printf "%s\n" "$msg" fi fi # After the CRITLOCALMOUNTED script has finished, it's # OK to flush the log to disk case "$1" in */CRITLOCALMOUNTED) rc_log_flush OK ;; esac ;; nop) # Do nothing. # This has the side effect of flushing partial lines, # and the echo() and printf() functions in rc.subr take # advantage of this. ;; note) # Unlike most metadata messages, which should be used # only by /etc/rc and rc.subr, the "note" message may be # used directly by /etc.rc.d/* and similar scripts. # It adds a note to the log file, without displaying # it to stdout. rc_log_message "[NOTE: $args]" ;; end) # Marks the end of processing, after the last child script. # If any child scripts (or other commands) failed, report them. # if [ -n "$rc_failures" ]; then rc_log_message "[failures]" msg="The following components reported failures:" msg="${msg}${nl}$( echo " ${rc_failures}" | fmt )" msg="${msg}${nl}See ${RC_LOG_FILE} for more information." rc_log_message "${msg}" printf "%s\n" "${msg}" fi # # Report the end date/time, even in silent mode # rc_log_message "[$0 finished at $args]" printf "%s\n" "$args" ;; exit) # Marks an exit from the rc_real_work() function. # This may be a normal or abnormal exit. # rc_log_message "[$0 exiting with status $1]" exit $1 ;; interrupted) # Marks an interrupt trapped by the rc_real_work() function. # $args is a human-readable message. rc_log_message "$args" printf "%s\n" "$args" ;; *) # an unrecognised line of metadata rc_log_message "[metadata:${metadata}]" ;; esac } # # rc_log_message string [...] # Write a message to the log file, or buffer it for later. # This function appends a newline to the message. # rc_log_message() { _rc_log_buffer="${_rc_log_buffer}${*}${nl}" rc_log_flush } # # rc_log_message_n string [...] # Just like rc_log_message, except without appending a newline. # rc_log_message_n() { _rc_log_buffer="${_rc_log_buffer}${*}" rc_log_flush } # # rc_log_flush [OK|FORCE] # save outstanding messages from $_rc_log_buffer to $RC_LOG_FILE. # # The log file is expected to reside in the /var/run directory, which # may not be writable very early in the boot sequence, and which is # erased a little later in the boot sequence. We therefore avoid # writing to the file until we believe it's safe to do so. We also # assume that it's reasonable to always append to the file, never # truncating it. # # Optional argument $1 may be "OK" to report that writing to the log # file is expected to be safe from now on, or "FORCE" to force writing # to the log file even if it may be unsafe. # # Returns a non-zero status if messages could not be written to the # file. # rc_log_flush() { # # If $_rc_log_flush_ok is false, then it's probably too early to # write to the log file, so don't do it, unless $1 is "FORCE". # : ${_rc_log_flush_ok=false} case "$1:$_rc_log_flush_ok" in OK:*) _rc_log_flush_ok=true ;; FORCE:*) : OK just this once ;; *:true) : OK ;; *) # it's too early in the boot sequence, so don't flush return 1 ;; esac # # Now append the buffer to the file. The buffer should already # contain a trailing newline, so don't add an extra newline. # if [ -n "$_rc_log_buffer" ]; then if { printf "%s" "${_rc_log_buffer}" >>"${RC_LOG_FILE}" ; } \ 2>/dev/null then _rc_log_buffer="" else return 1 fi fi return 0 } # # Most of the action is in the rc_real_work() and rc_postprocess() # functions. # rc_real_work "$@@" 2>&1 | rc_postprocess exit $? @ 1.174 log @Split the local disk availability step into two phases to allow scripts that pre-populate parts of the system (e.g. a tmpfs based /var) an easy place to plug in like: # REQUIRE: mountcritlocal # BEFORE: MOUNTCRITLOCAL This also cleans up the existing special handling a bit by separating it into new scripts. All later scripts now depend on MOUNTCRITLOCAL. Discussed on tech-userlevel some time ago. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.173 2017/03/20 16:02:48 christos Exp $ d194 1 a194 1 # after the MOUNTCRITLOCAL script has run. d325 1 a325 1 # After the MOUNTCRITLOCAL script has finished, it's d328 1 a328 1 */MOUNTCRITLOCAL) @ 1.173 log @set cloexec to the rc postprocessor fd (rudolf in tech-userlevel) @ text @d3 1 a3 1 # $NetBSD: rc,v 1.172 2017/02/02 20:49:55 christos Exp $ d194 1 a194 1 # after the mountcritlocal script has run. d325 1 a325 1 # After the mountcritlocal script has finished, it's d328 1 a328 1 */mountcritlocal) @ 1.172 log @add + @ text @d3 1 a3 1 # $NetBSD: rc,v 1.171 2017/02/02 20:01:36 christos Exp $ d90 1 @ 1.171 log @set 7 and 8 to close on exec. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.170 2014/07/29 20:39:16 apb Exp $ d68 1 a68 1 fdflags -s cloexec 7 8 @ 1.170 log @In the background subshell that flushes partial output every few seconds, detach from the controlling terminal. Without this, pressing control-T (to send SIGINFO from the terminal) would almost always result in the sleep process printing "about N seconds left of the original 3", which is useless information. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.169 2014/07/27 07:46:46 apb Exp $ d68 1 @ 1.170.10.1 log @Sync with HEAD @ text @d3 1 a3 1 # $NetBSD: rc,v 1.173 2017/03/20 16:02:48 christos Exp $ a67 1 fdflags -s +cloexec 7 8 a88 1 fdflags -s +cloexec 9 @ 1.170.6.1 log @Sync with HEAD @ text @d3 1 a3 1 # $NetBSD: rc,v 1.172 2017/02/02 20:49:55 christos Exp $ a67 1 fdflags -s +cloexec 7 8 @ 1.170.6.2 log @Sync with HEAD @ text @d3 1 a3 1 # $NetBSD: rc,v 1.173 2017/03/20 16:02:48 christos Exp $ a89 1 fdflags -s +cloexec 9 @ 1.169 log @In rc.subr, add _have_rc_postprocessor function and use it instead of inline tests like [ -n "${_rc_postprocessor_fd}" ]. The new function performs a few new tests, including verifying that /etc/rc is still running (using a new _rc_pid variable set by /etc/rc). This is intended to deal with the case that a script run from /etc/rc spawns a background process, then /etc/rc exits, but the background process still has environment variables inherited from /etc/rc. Fixes PR 46546. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.168 2014/04/09 12:45:05 apb Exp $ d130 4 @ 1.168 log @Send a "nop" metadata message to the postprocessor every few seconds, to flush partial output lines. This should help with PR 48714. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.167 2014/04/09 12:38:09 apb Exp $ d87 1 @ 1.167 log @Add comments about the intended use of each type of metadata message. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.166 2011/08/11 22:52:47 apb Exp $ d122 14 @ 1.166 log @Allow "echo -n" to work as expected in rc.d scripts that are executed by /etc/rc. Similarly for printf with a format that does not end with "\n". Previously, the partial line would not be visible on the console until a newline was printed, possibly after an annoying delay. This is done by adding echo() and printf() shell functions to rc.subr, so that naive use of the echo and printf commands in rc.d scripts will call these functions instead of the underlying commands. These shell functions send a new "nop" metadata message after the partial line, and the rc_postprocess function in /etc/rc disentangles the partial line of plain output from the metadata "nop". Also add a "-n" option to the print_rc_normal function in rc.subr, and make some cosmetic changes. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.165 2010/06/04 18:42:54 christos Exp $ d280 2 a281 1 # $args contains a date/time d288 2 d293 1 d314 3 d319 5 d327 2 a328 2 # # If any scripts (or other commands) failed, report them. d345 3 d352 2 a353 1 # $args is a human-readable message @ 1.166.8.1 log @Rebase to HEAD as of a few days ago. @ text @d3 1 a3 1 # $NetBSD$ a86 1 _rc_pid=$$ ; export _rc_pid a121 18 # As long as process $RC_PID is still running, send a "nop" # metadata message to the postprocessor every few seconds. # This should help flush partial lines that may appear when # rc.d scripts that are NOT marked with "KEYWORD: interactive" # nevertheless attempt to print prompts and wait for input. # ( # First detach from tty, to avoid intercepting SIGINFO. eval "exec ${_rc_original_stdout_fd}<&-" eval "exec ${_rc_original_stderr_fd}<&-" exec /dev/null 2>&1 while kill -0 $RC_PID ; do print_rc_metadata "nop" sleep 3 done ) & # d280 1 a280 2 # Marks the start of the entire /etc/rc script. # $args contains a date/time. a286 2 # Marks the start of a child script (usually one of # the /etc/rc.d/* scripts). a289 1 # Marks the end of a child script. a309 3 # This has the side effect of flushing partial lines, # and the echo() and printf() functions in rc.subr take # advantage of this. a311 5 # Unlike most metadata messages, which should be used # only by /etc/rc and rc.subr, the "note" message may be # used directly by /etc.rc.d/* and similar scripts. # It adds a note to the log file, without displaying # it to stdout. d315 2 a316 2 # Marks the end of processing, after the last child script. # If any child scripts (or other commands) failed, report them. a332 3 # Marks an exit from the rc_real_work() function. # This may be a normal or abnormal exit. # d337 1 a337 2 # Marks an interrupt trapped by the rc_real_work() function. # $args is a human-readable message. @ 1.166.20.1 log @Rebase. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.170 2014/07/29 20:39:16 apb Exp $ a86 1 _rc_pid=$$ ; export _rc_pid a121 18 # As long as process $RC_PID is still running, send a "nop" # metadata message to the postprocessor every few seconds. # This should help flush partial lines that may appear when # rc.d scripts that are NOT marked with "KEYWORD: interactive" # nevertheless attempt to print prompts and wait for input. # ( # First detach from tty, to avoid intercepting SIGINFO. eval "exec ${_rc_original_stdout_fd}<&-" eval "exec ${_rc_original_stderr_fd}<&-" exec /dev/null 2>&1 while kill -0 $RC_PID ; do print_rc_metadata "nop" sleep 3 done ) & # d280 1 a280 2 # Marks the start of the entire /etc/rc script. # $args contains a date/time. a286 2 # Marks the start of a child script (usually one of # the /etc/rc.d/* scripts). a289 1 # Marks the end of a child script. a309 3 # This has the side effect of flushing partial lines, # and the echo() and printf() functions in rc.subr take # advantage of this. a311 5 # Unlike most metadata messages, which should be used # only by /etc/rc and rc.subr, the "note" message may be # used directly by /etc.rc.d/* and similar scripts. # It adds a note to the log file, without displaying # it to stdout. d315 2 a316 2 # Marks the end of processing, after the last child script. # If any child scripts (or other commands) failed, report them. a332 3 # Marks an exit from the rc_real_work() function. # This may be a normal or abnormal exit. # d337 1 a337 2 # Marks an interrupt trapped by the rc_real_work() function. # $args is a human-readable message. @ 1.166.2.1 log @sync with head. for a reference, the tree before this commit was tagged as yamt-pagecache-tag8. this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments") @ text @d3 1 a3 1 # $NetBSD: rc,v 1.166 2011/08/11 22:52:47 apb Exp $ a121 14 # As long as process $RC_PID is still running, send a "nop" # metadata message to the postprocessor every few seconds. # This should help flush partial lines that may appear when # rc.d scripts that are NOT marked with "KEYWORD: interactive" # nevertheless attempt to print prompts and wait for input. # ( while kill -0 $RC_PID ; do print_rc_metadata "nop" sleep 3 done ) & # d280 1 a280 2 # Marks the start of the entire /etc/rc script. # $args contains a date/time. a286 2 # Marks the start of a child script (usually one of # the /etc/rc.d/* scripts). a289 1 # Marks the end of a child script. a309 3 # This has the side effect of flushing partial lines, # and the echo() and printf() functions in rc.subr take # advantage of this. a311 5 # Unlike most metadata messages, which should be used # only by /etc/rc and rc.subr, the "note" message may be # used directly by /etc.rc.d/* and similar scripts. # It adds a note to the log file, without displaying # it to stdout. d315 2 a316 2 # Marks the end of processing, after the last child script. # If any child scripts (or other commands) failed, report them. a332 3 # Marks an exit from the rc_real_work() function. # This may be a normal or abnormal exit. # d337 1 a337 2 # Marks an interrupt trapped by the rc_real_work() function. # $args is a human-readable message. @ 1.165 log @print human readable exit code. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.164 2009/09/11 18:17:04 apb Exp $ d27 4 d201 2 a202 1 # the line. Treat it like two separate lines. d204 1 a204 1 rc_postprocess_plain_line "${before}" d241 16 d308 3 d350 2 a351 1 # write a message to the log file, or buffer it for later. d360 10 @ 1.164 log @Add a postprocessor to /etc/rc, which logs messages to /var/run/rc.log, and which can suppress output in silent mode. Silent mode is enabled via the new rc_silent variable, which defaults to a value that depends on the kern.boothowto sysctl. Part of the /etc/rc silent changes requested in PR 41946 and proposed in tech-userlevel. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.163 2009/04/10 16:18:04 joerg Exp $ d273 1 a273 1 msg="$1 reported failure status $2" @ 1.163 log @Add rc_directories to specify where to look for rc scripts. For the moment all scripts must be in /root and non-existent directories are skipped. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.162 2003/01/04 15:27:43 lukem Exp $ d6 2 a7 1 # Run the scripts in /etc/rc.d with rcorder. d17 5 a21 1 . /etc/rc.subr d25 2 d37 5 a41 1 stty status '^T' a42 2 # Set shell to ignore SIGINT, but not children; # shell catches SIGQUIT and returns to single user. d44 9 a52 2 trap : INT trap "echo 'Boot interrupted.'; exit 1" QUIT d54 10 a63 1 date d65 82 a146 4 scripts=$(for rcd in ${rc_directories:-/etc/rc.d}; do test -d ${rcd} && echo ${rcd}/*; done) files=$(rcorder -s nostart ${rc_rcorder_flags} ${scripts}) d148 185 a332 3 for _rc_elem in $files; do run_rc_script $_rc_elem start done d334 63 a396 2 date exit 0 @ 1.162 log @Change how internal boolean variables are used to: if ! ${_somevar:-false}; then _somevar=true fi (Consisent, slightly quicker, and slightly cleaner) @ text @d3 1 a3 1 # $NetBSD: rc,v 1.161 2002/05/19 01:01:32 lukem Exp $ d40 4 a43 1 files=$(rcorder -s nostart ${rc_rcorder_flags} /etc/rc.d/*) @ 1.162.42.1 log @Sync with HEAD. Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html @ text @d3 1 a3 1 # $NetBSD: rc,v 1.163 2009/04/10 16:18:04 joerg Exp $ d40 1 a40 4 scripts=$(for rcd in ${rc_directories:-/etc/rc.d}; do test -d ${rcd} && echo ${rcd}/*; done) files=$(rcorder -s nostart ${rc_rcorder_flags} ${scripts}) @ 1.161 log @Add two new rc.conf(5) variables: rc_rcorder_flags extra flags to rcorder(8) in /etc/rc rcshutdown_rcorder_flags extra flags to rcorder(8) in /etc/rc.shutdown This can be used to specify extra directories to search for rc.d scripts in. For example, adding the following to rc.conf(5): rc_rcorder_flags="/usr/pkg/etc/rc.d/*" rcshutdown_rcorder_flags="/usr/pkg/etc/rc.d/*" will add the files in /usr/pkg/etc/rc.d to the list of files that rcorder(8) uses to build the list of scripts to start or stop. I proposed this functionality on tech-userlevel@@ over one month ago. Closes the recent [misc/16888], which asked for a similar feature. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.160 2002/04/18 07:18:05 lukem Exp $ d18 1 a18 1 _rc_conf_loaded=YES @ 1.160 log @consistently set rc_(fast|force)=yes @ text @d3 1 a3 1 # $NetBSD: rc,v 1.159 2002/03/22 04:16:38 lukem Exp $ d40 1 a40 1 files=`rcorder -s nostart /etc/rc.d/*` @ 1.159 log @- Rename a bunch of "internal" run_rc_command() variables and officially make them "externally" available: Previous Current Purpose -------- ------- ------- _arg rc_arg Argument to command, after fast/force processing performed (and prefix removed) _flags rc_flags Flags to start the default command with. Defaults to ${name}_flags, unless overridden by $flags from the environment. This variable may be changed by the precmd method. _pid rc_pid PID of command (if appropriate). _rc_run_fast rc_fast Not empty is "fast" was provided. _rc_run_force rc_force Not empty is "force" was provided. - Use rc_flags instead of _flags or ${name}_flags in various rc.d scripts, so that $flags from the environment overrides ${name}_flags from rc.conf(5). Fixes [bin/15800]. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.158 2001/06/14 07:50:06 lukem Exp $ d27 1 a27 1 rc_fast=YES # run_rc_command(): do fast booting @ 1.158 log @use symbolic signal names instead of numbers @ text @d3 1 a3 1 # $NetBSD: rc,v 1.157 2001/05/09 16:53:45 lukem Exp $ d27 1 a27 1 _rc_fast_run=yes # run_rc_command(): do fast booting @ 1.157 log @explicitly set the umask to 022 to be safe @ text @d3 1 a3 1 # $NetBSD: rc,v 1.156 2001/03/12 15:56:39 lukem Exp $ d32 2 a33 2 # Set shell to ignore SIGINT (2), but not children; # shell catches SIGQUIT (3) and returns to single user. d35 2 a36 2 trap : 2 trap "echo 'Boot interrupted.'; exit 1" 3 @ 1.156 log @move date before rcorder @ text @d3 1 a3 1 # $NetBSD: rc,v 1.155 2001/02/28 16:49:18 lukem Exp $ d14 1 @ 1.155 log @various speed-ups (and related work): - only load rc.conf if $_rc_conf_loaded is not set - use case instead of if for various string comparisons - print the date at the start of the boot as well as at the end - if $rc_fast_and_loose is set, always run the rc.d scripts in the current shell rather than in a subshell. this is not on by default because it's potentially dangerous (a rogue command could terminate the boot), but it is provided as an optional speedup for people with slow machines that have an expensive fork @ text @d3 1 a3 1 # $NetBSD: rc,v 1.154 2000/12/15 00:00:09 lukem Exp $ d37 2 a39 2 date @ 1.154 log @- describe what rc.shutdown does, and what invokes it - remove `.sh' suffix on script name in description @ text @d3 1 a3 1 # $NetBSD: rc,v 1.153 2000/08/21 23:09:50 lukem Exp $ d17 1 d39 4 a42 2 for i in $files; do run_rc_script $i start @ 1.153 log @don't start rc.d scripts with a `nostart' keyword @ text @d3 1 a3 1 # $NetBSD: rc,v 1.152 2000/04/22 03:01:22 lukem Exp $ d5 1 a5 1 # rc.sh -- d8 1 a8 1 # System startup script run by init on autoboot or after single-user. @ 1.152 log @revert previous; the fast-start functionality already existed, and works at multi-user boot. (starting /etc/rc after single user boot doesn't exhibit this fast start behaviour). @ text @d3 1 a3 1 # $NetBSD: rc,v 1.151 2000/04/19 04:26:22 simonb Exp $ d36 1 a36 1 files=`rcorder /etc/rc.d/*` @ 1.152.4.1 log @pull up rev 1.153 (approved by thorpej): don't start rc.d scripts that have a `nostart' keyword @ text @d3 1 a3 1 # $NetBSD: rc,v 1.153 2000/08/21 23:09:50 lukem Exp $ d36 1 a36 1 files=`rcorder -s nostart /etc/rc.d/*` @ 1.151 log @Add an "rc_fastboot" variable check in rc.subr, that if set adds "fast" to the start of the run_rc_command arg. /etc/rc calls each rc.d script with rc_fastboot=yes so that rc.subr aware scripts to use "faststart" to skip the process running check. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.150 2000/03/29 02:13:51 enami Exp $ d39 1 a39 1 rc_fastboot=yes run_rc_script $i start @ 1.150 log @Check rc_configured also here, and bail out if it isn't set to yes. @ text @d3 1 a3 1 # $NetBSD: rc,v 1.149 2000/03/10 13:15:58 lukem Exp $ d39 1 a39 1 run_rc_script $i start @ 1.149 log @run scripts in /etc/rc.d/* in the order returned by rcorder @ text @d3 1 a3 1 # $NetBSD$ d17 5 @ 1.148 log @make clearing of /tmp after reboot configurable (default on), as per recent discussion on current-users @ text @d1 10 a10 2 # $NetBSD: rc,v 1.147 2000/02/09 16:24:03 itojun Exp $ # originally from: @@(#)rc 8.2 (Berkeley) 3/17/94 d12 2 a13 11 # 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. stty status '^T' # Set shell to ignore SIGINT (2), but not children; # shell catches SIGQUIT (3) and returns to single user after fsck. trap : 2 trap : 3 # shouldn't be needed d15 2 a16 2 export HOME=/ export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin d18 3 a20 3 # Configure ccd devices. if [ -f /etc/ccd.conf ]; then ccdconfig -C d23 1 a23 46 # Configure raid devices. for dev in 0 1 2 3; do if [ -f /etc/raid$dev.conf ]; then raidctl -c /etc/raid$dev.conf raid$dev fi done # Add all block-type swap devices; these might be necessary # during disk checks. swapctl -A -t blk if [ -e /fastboot ]; then echo "Fast boot: skipping disk checks." elif [ "$1" = autoboot ]; then echo "Automatic boot in progress: starting file system checks." fsck -p case $? in 0) ;; 2) exit 1 ;; 4) echo "Rebooting..." reboot echo "Reboot failed; help!" exit 1 ;; 8) echo "Automatic file system check failed; help!" exit 1 ;; 12) echo "Boot interrupted." exit 1 ;; 130) # interrupt before catcher installed exit 1 ;; *) echo "Unknown error; help!" exit 1 ;; esac fi d25 4 d31 1 a31 3 umount -a >/dev/null 2>&1 mount / rm -f /fastboot # XXX (root now writeable) d33 3 a35 554 if [ -f /etc/rc.subr ]; then . /etc/rc.subr else echo "Can't read /etc/rc.subr; aborting." exit 1; fi if [ -f /etc/rc.conf ]; then . /etc/rc.conf fi if ! checkyesno rc_configured; then echo "/etc/rc.conf is not configured. Multiuser boot aborted." exit 1 fi # set flags on ttys. (do early, in case they use tty for SLIP in netstart) echo 'setting tty flags' ttyflags -a # load kernel modules specified in /etc/lkm.conf if the /usr filesystem # is already present with "/" or can be mounted now if checkyesno lkm && [ -f /etc/rc.lkm ]; then mount /usr >/dev/null 2>&1 if [ -x /usr/bin/ld ]; then lkmstage=BEFORENET . /etc/rc.lkm fi fi mount_critical_filesystems local if [ -e /etc/etc.current ] ; then if [ -h /etc/etc.default ] ; then def=`ls -ld /etc/etc.default 2>&1` default=`expr "$def" : '.*-> etc\.\(.*\)' 2>&1` else default=current fi spc="" conflist=`cd /etc; ls -1d etc.* 2>&1 | egrep -v 'current|default'` for i in $conflist; do name=`expr $i : 'etc\.\(.*\)' 2>&1` if [ $name = $default ] ; then echo -n "${spc}[${name}]" else echo -n "${spc}${name}" fi spc=" " done echo master=$$ conf=/etc/passwd while [ ! -d /etc/etc.$conf ] ; do trap 'conf=$default; echo; echo Using default of $conf' 14 echo -n "Which configuration [$default] ? " (sleep 30 && kill -ALRM $master) >/dev/null 2>&1 & read conf trap "" 14 if [ -z $conf ] ; then conf=$default fi if [ ! -d /etc/etc.$conf -a ! -h /etc/etc.$conf ] ; then conf=/etc/passwd fi done rm -f /etc/etc.current ln -s /etc/etc.$conf /etc/etc.current if [ -f /etc/rc.conf ] ; then . /etc/rc.conf fi fi # set hostname, turn on network echo 'starting network' sh /etc/netstart if [ $? -ne 0 ]; then exit 1 fi mount_critical_filesystems network # Network Address Translation... if checkyesno ipnat && [ -f /etc/ipnat.conf ]; then echo 'installing NAT rules ... ' if ! checkyesno ipfilter || [ ! -f /etc/ipf.conf ]; then ipf -E -Fa fi ipnat -F -f /etc/ipnat.conf fi # "Critical" file systems are now mounted. Go ahead and swap # to files now, since they will be residing in the critical file # systems (or, at least, better). swapctl -A -t noblk # Check for no swap, and warn about it unless that is desired. if ! checkyesno no_swap; then swapctl -s | grep 'no swap devices configured' > /dev/null && \ echo "WARNING: no swap space configured!" fi # clean up left-over files rm -f /etc/nologin rm -f /var/spool/lock/LCK.* rm -f /var/spool/uucp/STST/* (cd /var/run && { rm -rf -- *; install -c -m 664 -g utmp /dev/null utmp; }) # build ps databases echo 'building databases...' # if this kernel supports machdep.booted_kernel, use that to build the KVM # db so dmesg will run work when we boot /netbsd.new, etc. sysctl machdep 2>/dev/null | grep -q booted_kernel if [ $? -eq 0 ] ; then kvm_mkdb `sysctl -n machdep.booted_kernel` if [ $? -ne 0 ] ; then kvm_mkdb /netbsd fi else kvm_mkdb /netbsd fi dev_mkdb # get the system dmesg output, hopefully containing the boot messages # $dmesg_flags is imported from /etc/rc.conf if checkyesno dmesg; then dmesg $dmesg_flags > /var/run/dmesg.boot fi if checkyesno wscons && [ -f /etc/rc.wscons ]; then echo 'configuring wscons' /bin/sh /etc/rc.wscons $wscons_flags fi # start the system logger first, so that all messages from daemons # are logged, then start savecore to get a dump on low memory systems # and then start the name server. if checkyesno syslogd; then echo 'starting system logger' # Transitional symlink for old binaries if [ ! -h /dev/log ] ; then ln -sf /var/run/log /dev/log fi rm -f /var/run/log syslogd $syslogd_flags fi # Enable ipmon (only useful if ipfilter is running) # NOTE: requires the IPFILTER_LOG kernel option. if checkyesno ipmon; then echo 'starting ipmon' ipmon $ipmon_flags & fi # /var/crash should be a directory or a symbolic link # to the crash directory if core dumps are to be saved. if checkyesno savecore; then if [ -d /var/crash/. ]; then echo checking for core dump... savecore $savecore_flags /var/crash else logger -s "WARNING: no /var/crash directory; savecore not run." fi fi if checkyesno named; then echo 'starting name server'; named $named_flags fi # set time, if requested if checkyesno ntpdate; then if [ -z "$ntpdate_hosts" ]; then ntpdate_hosts=`awk ' /^server[ \t]*127.127/ {next} /^(server|peer)/ {print $2} ' /var/db/mountdtab echo -n ' mountd'; mountd $mountd_flags echo -n ' nfsd'; nfsd $nfsd_flags nfs_locking=YES else echo logger -s "WARNING: /etc/exports not readable;" \ "NFS server not started." fi fi if checkyesno nfs_client; then echo -n ' nfsiod'; nfsiod $nfsiod_flags nfs_locking=YES fi if checkyesno nfs_locking; then if checkyesno statd; then echo -n ' rpc.statd'; rpc.statd $statd_flags fi if checkyesno lockd; then echo -n ' rpc.lockd'; rpc.lockd $lockd_flags fi fi if checkyesno amd; then if [ -d "$amd_dir" ]; then if [ -r "$amd_master" ]; then echo -n ' amd' amd $amd_flags -p -a $amd_dir \ `sed s/#.*$// <$amd_master` >/var/run/amd.pid else echo logger -s "WARNING: \$amd_master" \ " ($amd_master) not readable;" \ "amd not started." fi else echo logger -s "WARNING: \$amd_dir ($amd_dir) not a" \ "directory; amd not started." fi fi echo '.' fi if [ -f /sbin/ldconfig ]; then echo 'creating runtime link editor directory cache.' ldconfig fi # load kernel modules specified in /etc/lkm.conf if checkyesno lkm && [ -f /etc/rc.lkm ]; then lkmstage=AFTERMOUNT . /etc/rc.lkm fi # if $defcorename is set, change it here. if [ -n "$defcorename" ]; then echo -n 'setting default core name template: ' sysctl -w kern.defcorename=$defcorename fi # if $securelevel is set, change it here, else if it is 0, change # it to 1 here, before we start login services. if [ -n "$securelevel" ]; then echo -n 'setting securelevel: ' sysctl -w kern.securelevel=$securelevel else securelevel=`sysctl -n kern.securelevel` if [ x"$securelevel" = x0 ]; then echo -n 'setting securelevel: ' sysctl -w kern.securelevel=1 fi fi echo -n 'checking quotas:'; quotacheck -a; echo ' done.' quotaon -a 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 # XXX replace me with a script that works! virecovery=`echo /var/tmp/vi.recover/recover.*` if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then echo preserving editor files for i in $virecovery; do if [ -f $i ]; then sendmail -t < $i fi done fi # sweep /tmp if checkyesno clear_tmp; then echo clearing /tmp # Prune quickly with one rm, then use find to clean up /tmp/[lq]* (this # is not needed with mfs /tmp, but doesn't hurt anything). (cd /tmp && rm -rf [a-km-pr-zA-Z]* && find . ! -name . ! -name lost+found ! -name quota.user \ ! -name quota.group -exec rm -rf -- {} \; -type d -prune) fi # Update kernel info in /etc/motd # Must be done *before* interactive logins are possible to prevent # possible race conditions. if checkyesno update_motd; then echo 'updating motd.' if [ ! -f /etc/motd ]; then install -c -o root -g wheel -m 664 /dev/null /etc/motd fi T=/etc/_motd rm -f $T sysctl -n kern.version | sed 1q > $T echo "" >> $T sed '1,/^$/d' < /etc/motd >> $T cmp -s $T /etc/motd || cp $T /etc/motd rm -f $T fi if checkyesno accounting; then if [ -f /var/account/acct ]; then echo 'turning on accounting' accton /var/account/acct else logger -s "WARNING: /var/account/acct doesn't exist;" \ "accounting not enabled." fi fi echo -n standard daemons: if checkyesno cron; then echo -n ' cron'; cron fi echo '.' # now start all the other daemons echo -n starting network daemons: if checkyesno gated && checkyesno routed; then echo logger -s "WARNING: gated and routed both requested to be run:" \ "running only gated." routed=NO fi if checkyesno gated; then if [ -r /etc/gated.conf ]; then echo -n ' gated'; gated $gated_flags else echo logger -s "WARNING: no /etc/gated.conf; gated not started." fi fi if checkyesno routed; then echo -n ' routed'; routed $routed_flags fi if checkyesno mrouted; then echo -n ' mrouted'; mrouted $mrouted_flags fi if checkyesno route6d; then echo -n ' route6d'; route6d $route6d_flags fi if checkyesno rtsold; then if test "x$ip6mode" = "xautohost"; then echo -n ' rtsold'; rtsold $rtsold_flags else echo logger -s "WARNING: ip6mode must be set to autohost" \ "to use rtsold." fi fi if checkyesno rtadvd; then if test "x$ip6mode" = "xrouter"; then echo -n ' rtadvd'; rtadvd $rtadvd_flags else echo logger -s "WARNING: rtadvd can be used on IPv6 router only." fi fi if checkyesno timed; then echo -n ' timed'; timed $timed_flags fi if checkyesno xntpd; then echo -n ' xntpd'; xntpd $xntpd_flags fi if checkyesno dhcpd; then if [ -r /etc/dhcpd.conf ]; then echo -n ' dhcpd'; dhcpd $dhcpd_flags else echo logger -s "WARNING: /etc/dhcpd.conf not readable;" \ "dhcpd not started." fi elif checkyesno dhcrelay; then echo -n ' dhcrelay'; dhcrelay $dhcrelay_flags fi if checkyesno rwhod; then echo -n ' rwhod'; rwhod fi if checkyesno lpd; then echo -n ' lpd'; lpd $lpd_flags fi # We call sendmail with a full path so that SIGHUP works. if checkyesno sendmail; then if [ -r /etc/sendmail.cf ]; then echo -n ' sendmail'; /usr/sbin/sendmail $sendmail_flags else echo logger -s "WARNING: /etc/sendmail.cf not readable;" \ "sendmail not started." fi fi # Start xfs before boot daemons, so its ready before client xterminals. if checkyesno xfs; then echo -n ' xfs'; xfs $xfs_flags sleep 2 fi if checkyesno rarpd; then if [ -r /etc/ethers ]; then echo -n ' rarpd'; rarpd $rarpd_flags else echo logger -s "WARNING: /etc/ethers not readable;" \ "rarpd not started." fi fi if checkyesno rbootd; then if [ -r /etc/rbootd.conf ]; then echo -n ' rbootd'; rbootd $rbootd_flags else echo logger -s "WARNING: /etc/rbootd.conf not readable;" \ "rbootd not started." fi fi if checkyesno mopd; then echo -n ' mopd'; mopd $mopd_flags fi if checkyesno apmd; then echo -n ' apmd'; apmd $apmd_flags fi if checkyesno screenblank; then echo -n ' screenblank'; screenblank $screenblank_flags fi if checkyesno inetd; then if [ -r /etc/inetd.conf ]; then echo -n ' inetd'; inetd $inetd_flags else echo logger -s "WARNING: /etc/inetd.conf not readable;" \ "inetd not started." fi fi echo '.' # Kerberos runs ONLY on the Kerberos server machine if checkyesno kerberos; then echo -n 'starting kerberos daemons:' echo -n ' kerberos'; kerberos >> /var/log/kerberos.log & echo -n ' kadmind'; kadmind -n >> /var/log/kadmind.log & echo '.' fi # xdm after wscons - need a virtual screen for X if checkyesno xdm; then echo 'starting xdm' xdm $xdm_flags fi . /etc/rc.local @ 1.147 log @ip6forwarding -> ip6mode change (somehow i forgot to commit...) PR: 9375 @ text @d1 1 a1 1 # $NetBSD: rc,v 1.146 2000/02/05 17:02:42 itojun Exp $ d433 10 a442 7 echo clearing /tmp # Prune quickly with one rm, then use find to clean up /tmp/[lq]* (this # is not needed with mfs /tmp, but doesn't hurt anything). (cd /tmp && rm -rf [a-km-pr-zA-Z]* && find . ! -name . ! -name lost+found ! -name quota.user \ ! -name quota.group -exec rm -rf -- {} \; -type d -prune) @ 1.146 log @change IPv6 configuration syntax to avoid ambiguity. ip6mode=host: IPv6 host ip6mode=autohost: IPv6 host, with autoconfig ip6mode=router: IPv6 router backward compatibility to "ip6forwading" is provided. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.145 2000/01/31 12:47:29 jdc Exp $ d516 1 a516 1 if checkyesno ip6forwarding; then d520 1 a520 1 logger -s "WARNING: rtadvd cannot be used on IPv6 host." @ 1.145 log @Allow NFS servers to start up. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.144 2000/01/19 12:00:49 tron Exp $ d506 3 a508 1 if checkyesno ip6forwarding; then d510 2 a511 3 logger -s "WARNING: rtsold cannot be used on IPv6 router." else echo -n ' rtsold'; rtsold $rtsold_flags @ 1.144 log @Start automount daemon even if NFS client is not activated. This makes sense for system where "amd" is used to mount local devices like e.g. CD-ROM drives. Fixes PR misc/9126 by Bjoern Labitzke. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.142 2000/01/07 05:53:21 enami Exp $ d318 1 a318 1 if checkyesno nfs_client || checkyesno nfs_client || checkyesno amd; then @ 1.143 log @Make some warning message consistient with others. @ text @d318 1 a318 1 if checkyesno nfs_client || checkyesno nfs_server; then d321 2 a322 1 if checkyesno nfs_server && ! checkyesno portmap; then d325 1 a325 1 "if nfs_server=YES." @ 1.142 log @Since the logger(1) puts space between its arguments, there is no need to pass it explicitly. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.141 2000/01/07 05:25:45 enami Exp $ d176 1 a176 1 echo "WARNING: no swap space configured!" d298 1 a298 1 logger -s "WARNING: /etc/bootparams not found." \ @ 1.141 log @Make sure that warning message starts from the beginning of line. Some warning recently added didn't care about it. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.140 2000/01/07 05:11:43 enami Exp $ d272 1 a272 1 logger -s "WARNING: set portmap=YES in /etc/rc.conf " \ d286 1 a286 1 logger -s "WARNING: set ypserv=YES in /etc/rc.conf " \ d298 1 a298 1 logger -s "WARNING: /etc/bootparams not found. " \ d323 1 a323 1 logger -s "WARNING: set portmap=YES in /etc/rc.conf " \ d338 1 a338 1 logger -s "WARNING: /etc/exports not readable; " \ d365 2 a366 2 logger -s "WARNING: \$amd_master " \ "($amd_master) not readable; " \ d371 1 a371 1 logger -s "WARNING: \$amd_dir ($amd_dir) not a " \ d462 1 a462 1 logger -s "WARNING: /var/account/acct doesn't exist; " \ d478 1 a478 1 logger -s "WARNING: gated and routed both requested to be run: " \ d535 1 a535 1 logger -s "WARNING: /etc/dhcpd.conf not readable; " \ d556 1 a556 1 logger -s "WARNING: /etc/sendmail.cf not readable; " \ d572 1 a572 1 logger -s "WARNING: /etc/ethers not readable; " \ d582 1 a582 1 logger -s "WARNING: /etc/rbootd.conf not readable; " \ d604 1 a604 1 logger -s "WARNING: /etc/inetd.conf not readable; " \ @ 1.140 log @Cosmetic changes; folding long lines, using tab instead of spaces where appropriate and fixing some indentation. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.139 2000/01/04 05:20:51 lukem Exp $ d270 5 a274 2 checkyesno portmap || \ logger -s "WARNING: set portmap=YES in /etc/rc.conf if ypserv=YES." d284 5 a288 2 checkyesno ypserv || \ logger -s "WARNING: set ypserv=YES in /etc/rc.conf if yppasswdd=YES." d322 1 a461 1 echo d487 1 d506 1 d517 1 @ 1.139 log @don't need to background xfs now that it auto-backgrounds itself... @ text @d1 1 a1 1 # $NetBSD: rc,v 1.138 1999/11/23 15:12:43 hubertf Exp $ d191 1 a191 1 kvm_mkdb `sysctl -n machdep.booted_kernel` d252 1 a252 1 /^(server|peer)/ {print $2} d266 1 a266 1 echo -n ' portmap'; portmap $portmap_flags d273 1 a273 1 echo -n ' ypserv'; ypserv $ypserv_flags d277 1 a277 1 echo -n ' ypbind'; ypbind $ypbind_flags d284 1 a284 1 echo -n ' rpc.yppasswdd'; rpc.yppasswdd $yppasswdd_flags d316 2 a317 1 logger -s "WARNING: set portmap=YES in /etc/rc.conf if nfs_server=YES." d326 2 a327 2 echo -n ' mountd'; mountd $mountd_flags echo -n ' nfsd'; nfsd $nfsd_flags d337 1 a337 1 echo -n ' nfsiod'; nfsiod $nfsiod_flags d358 3 a360 2 logger -s "WARNING: \$amd_master ($amd_master)not " \ "readable; amd not started." d364 2 a365 2 logger -s "WARNING: \$amd_dir ($amd_dir) not a directory; " \ "amd not started." d411 1 a411 1 'password file may be incorrect -- /etc/ptmp exists' d530 1 a530 1 echo -n ' dhcrelay'; dhcrelay $dhcrelay_flags @ 1.138 log @Add some boot time warnings: - if ypserv=yes but portmap=no - if yppasswdd=yes but ypserv=no - if nfs_server=yes but portmap=no Per discussion on tech-userlevel@@netbsd.org. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.137 1999/11/23 08:05:04 lukem Exp $ d552 1 a552 1 echo -n ' xfs'; xfs $xfs_flags & @ 1.137 log @accounting should be controllable via $accounting=YES in rc.conf... @ text @d1 1 a1 1 # $NetBSD: rc,v 1.136 1999/11/15 20:04:50 fvdl Exp $ d270 3 d281 3 d314 4 @ 1.136 log @Remove update, it's no longer used. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.135 1999/10/30 12:35:30 frueauf Exp $ d438 9 a446 2 if [ -f /var/account/acct ]; then echo 'turning on accounting'; accton /var/account/acct @ 1.135 log @Use checkyesno to check the state of $rc_configured like for any other variable set in /etc/rc.conf. Pointed out by Erik Bertelsen in pr 8522. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.134 1999/10/05 10:54:27 darrenr Exp $ a442 3 if checkyesno update; then echo -n ' update'; update $update_flags fi @ 1.134 log @move old dev_mkdb and "kvm_mkdb /netbsd" up into the section which builds kvm_mkdb based on machdep.boot_kernel. also failover to "kvm_mkdb /netbsd". @ text @d1 1 a1 1 # $NetBSD: rc,v 1.133 1999/10/05 10:32:56 darrenr Exp $ d88 1 a88 1 if [ "$rc_configured" != YES ]; then @ 1.133 log @send sysctl machdep errors to /dev/null merge in patches to implement multiple bootup configurations (look for /etc/etc.current, /etc/etc.default and friends) only start up NFS services if either nfs_client or nfs_server is yes. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.132 1999/09/28 14:53:17 bouyer Exp $ d185 2 d192 5 d198 2 a391 5 # build ps databases echo 'building databases...' kvm_mkdb /netbsd dev_mkdb @ 1.132 log @Add support for $defcorename @ text @d1 1 a1 1 # $NetBSD: rc,v 1.131 1999/09/16 11:00:44 darrenr Exp $ d109 41 d187 1 a187 1 sysctl machdep | grep -q booted_kernel d297 4 a300 1 echo -n 'starting nfs daemons:' d302 13 a314 1 nfs_locking=NO d316 2 a317 6 if checkyesno nfs_server; then if [ -r /etc/exports ]; then rm -f /var/db/mountdtab echo -n > /var/db/mountdtab echo -n ' mountd'; mountd $mountd_flags echo -n ' nfsd'; nfsd $nfsd_flags a318 4 else echo logger -s "WARNING: /etc/exports not readable; " \ "NFS server not started." a319 1 fi d321 7 a327 11 if checkyesno nfs_client; then echo -n ' nfsiod'; nfsiod $nfsiod_flags nfs_locking=YES fi if checkyesno nfs_locking; then if checkyesno statd; then echo -n ' rpc.statd'; rpc.statd $statd_flags fi if checkyesno lockd; then echo -n ' rpc.lockd'; rpc.lockd $lockd_flags a328 1 fi d330 11 a340 6 if checkyesno amd; then if [ -d "$amd_dir" ]; then if [ -r "$amd_master" ]; then echo -n ' amd' amd $amd_flags -p -a $amd_dir \ `sed s/#.*$// <$amd_master` >/var/run/amd.pid d343 2 a344 2 logger -s "WARNING: \$amd_master ($amd_master)not " \ "readable; amd not started." a345 4 else echo logger -s "WARNING: \$amd_dir ($amd_dir) not a directory; " \ "amd not started." d347 1 a349 1 echo '.' @ 1.131 log @If machdep.booted_kernel can be found in sysctl output, feed that name into kvm_mkdb so that when we boot we always have an upto-date kvm db, allowing dmesg and friends to run without error when we do "boot netbsd.fun" to test kernels, etc. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.130 1999/09/03 13:40:15 itojun Exp $ d317 6 @ 1.131.2.1 log @Pull up to last week's -current. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.138 1999/11/23 15:12:43 hubertf Exp $ d88 1 a88 1 if ! checkyesno rc_configured; then a108 41 if [ -e /etc/etc.current ] ; then if [ -h /etc/etc.default ] ; then def=`ls -ld /etc/etc.default 2>&1` default=`expr "$def" : '.*-> etc\.\(.*\)' 2>&1` else default=current fi spc="" conflist=`cd /etc; ls -1d etc.* 2>&1 | egrep -v 'current|default'` for i in $conflist; do name=`expr $i : 'etc\.\(.*\)' 2>&1` if [ $name = $default ] ; then echo -n "${spc}[${name}]" else echo -n "${spc}${name}" fi spc=" " done echo master=$$ conf=/etc/passwd while [ ! -d /etc/etc.$conf ] ; do trap 'conf=$default; echo; echo Using default of $conf' 14 echo -n "Which configuration [$default] ? " (sleep 30 && kill -ALRM $master) >/dev/null 2>&1 & read conf trap "" 14 if [ -z $conf ] ; then conf=$default fi if [ ! -d /etc/etc.$conf -a ! -h /etc/etc.$conf ] ; then conf=/etc/passwd fi done rm -f /etc/etc.current ln -s /etc/etc.$conf /etc/etc.current if [ -f /etc/rc.conf ] ; then . /etc/rc.conf fi fi a143 2 # build ps databases echo 'building databases...' d146 1 a146 1 sysctl machdep 2>/dev/null | grep -q booted_kernel a148 5 if [ $? -ne 0 ] ; then kvm_mkdb /netbsd fi else kvm_mkdb /netbsd a149 2 dev_mkdb a219 3 checkyesno portmap || \ logger -s "WARNING: set portmap=YES in /etc/rc.conf if ypserv=YES." a227 3 checkyesno ypserv || \ logger -s "WARNING: set ypserv=YES in /etc/rc.conf if yppasswdd=YES." d256 3 a258 2 if checkyesno nfs_client || checkyesno nfs_server; then echo -n 'starting nfs daemons:' d260 11 a270 2 if checkyesno nfs_server && ! checkyesno portmap; then logger -s "WARNING: set portmap=YES in /etc/rc.conf if nfs_server=YES." d272 1 d274 4 a277 15 nfs_locking=NO if checkyesno nfs_server; then if [ -r /etc/exports ]; then rm -f /var/db/mountdtab echo -n > /var/db/mountdtab echo -n ' mountd'; mountd $mountd_flags echo -n ' nfsd'; nfsd $nfsd_flags nfs_locking=YES else echo logger -s "WARNING: /etc/exports not readable; " \ "NFS server not started." fi fi d279 3 a281 3 if checkyesno nfs_client; then echo -n ' nfsiod'; nfsiod $nfsiod_flags nfs_locking=YES d283 2 a284 8 if checkyesno nfs_locking; then if checkyesno statd; then echo -n ' rpc.statd'; rpc.statd $statd_flags fi if checkyesno lockd; then echo -n ' rpc.lockd'; rpc.lockd $lockd_flags fi d286 1 d288 6 a293 11 if checkyesno amd; then if [ -d "$amd_dir" ]; then if [ -r "$amd_master" ]; then echo -n ' amd' amd $amd_flags -p -a $amd_dir \ `sed s/#.*$// <$amd_master` >/var/run/amd.pid else echo logger -s "WARNING: \$amd_master ($amd_master)not " \ "readable; amd not started." fi d296 2 a297 2 logger -s "WARNING: \$amd_dir ($amd_dir) not a directory; " \ "amd not started." d299 4 a303 1 echo '.' d306 1 a318 6 # if $defcorename is set, change it here. if [ -n "$defcorename" ]; then echo -n 'setting default core name template: ' sysctl -w kern.defcorename=$defcorename fi d335 5 d385 2 a386 9 if checkyesno accounting; then if [ -f /var/account/acct ]; then echo 'turning on accounting' accton /var/account/acct else echo logger -s "WARNING: /var/account/acct doesn't exist; " \ "accounting not enabled." fi d390 3 @ 1.130 log @add sanity check on rtadvd invocation (allowed on IPv6 routers only). add rc.conf entry for rtsold. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.129 1999/08/28 03:39:59 christos Exp $ d144 6 @ 1.129 log @check if vi recovery files are regular files before trying to e-mail them. Stops a denial of service attack where the user can put a named pipe or any other device that blocks i/o in /var/tmp/vi.recover/recover.* [from dynamo@@ime.net] @ text @d1 1 a1 1 # $NetBSD: rc,v 1.128 1999/08/05 20:51:57 christos Exp $ d422 8 d431 5 a435 1 echo -n ' rtadvd'; rtadvd $rtadvd_flags @ 1.128 log @Create temp _motd file in /etc @ text @d1 1 a1 1 # $NetBSD: rc,v 1.127 1999/07/03 03:29:29 itojun Exp $ d348 3 a350 1 sendmail -t < $i @ 1.127 log @add IPv6 configuration (ip6forwarding, rtsol, route6d and rtadvd). Right now netsetart does not bother you even if you do not have "options INET6" in the kernel. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.126 1999/06/30 06:48:05 augustss Exp $ d368 1 a368 1 T=/tmp/_motd @ 1.126 log @usbd is dead. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.125 1999/04/13 07:40:53 tron Exp $ d414 8 @ 1.125 log @Configure wscons much earlier so that a virtual console can e.g. be used for "syslogd" output. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.124 1999/04/01 03:58:44 cjs Exp $ a500 4 fi if checkyesno usbd; then echo -n ' usbd'; usbd $usbd_flags @ 1.124 log @Change mount_critical_filesystems() so that if given an argument of "local" it will not mount filesystem types it identifies as network file systems (currently just nfs). Call the function twice, before networking starts with arg "local", after networking starts with arg "network". Remove critfs_require_network as is now redundant. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.123 1999/03/26 13:45:47 drochner Exp $ d150 5 a514 5 fi if checkyesno wscons && [ -f /etc/rc.wscons ]; then echo 'configuring wscons' /bin/sh /etc/rc.wscons $wscons_flags @ 1.124.2.1 log @Pull up revision 1.124: Configure wscons much earlier so that a virtual console can e.g. be used for "syslogd" output. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.125 1999/04/13 07:40:53 tron Exp $ a149 5 if checkyesno wscons && [ -f /etc/rc.wscons ]; then echo 'configuring wscons' /bin/sh /etc/rc.wscons $wscons_flags fi d510 5 @ 1.124.2.2 log @Pull up revision 1.129: Fix denial-of-service attack involving vi preserve. (christos) @ text @d1 1 a1 1 # $NetBSD: rc,v 1.124.2.1 1999/04/13 18:25:07 tron Exp $ d348 1 a348 3 if [ -f $i ]; then sendmail -t < $i fi @ 1.123 log @start xdm after wscons configuration - the X server might want an own virtual screen @ text @d1 1 a1 1 # $NetBSD: rc,v 1.122 1999/03/26 13:10:17 sommerfe Exp $ d107 1 a107 3 if ! checkyesno critfs_require_network; then mount_critical_filesystems fi d116 1 a116 3 if checkyesno critfs_require_network; then mount_critical_filesystems fi @ 1.122 log @Add dhcrelay startup (allow only if dhcpd isn't started) @ text @d1 1 a1 1 # $NetBSD: rc,v 1.121 1999/03/26 01:11:45 oster Exp $ a505 4 if checkyesno xdm; then echo -n ' xdm'; xdm $xdm_flags fi d519 6 @ 1.121 log @Nuke the line 'raidctl -r raid$dev'. a) The '-r' option is now '-i', and b) with component labels and clean-bits working, this shouldn't be required at all on each boot! Thanks to Andrew Gillham for pointing this out. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.120 1999/03/24 18:59:47 mellon Exp $ d431 2 @ 1.120 log @- Move critical filesystem mounting code into a shell function and put that in rc.subr. - Support critfs_require_network rc.conf variable. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.119 1999/03/19 00:35:44 perry Exp $ a27 1 raidctl -r raid$dev @ 1.119 log @change to new syslog socket. make symlink from old to new location, too. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.118 1999/03/17 15:49:47 drochner Exp $ d108 4 d119 3 a121 13 for fs in /usr /var $critical_filesystems; do mount | ( ismounted=no while read what _on on _type type; do if [ $on = $fs ]; then ismounted=yes fi done if [ $ismounted = no ]; then mount $fs >/dev/null 2>&1 fi ) done @ 1.118 log @rc.wscons can take arguments, so we shouldn't simply source it but exec in a subshell. Being here, add a prototype wscons_flags variable. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.116 1999/02/07 14:56:01 frueauf Exp $ d167 5 a171 1 rm -f /dev/log @ 1.117 log @introduce a "wscons" rc.conf flag and run /etc/rc.wscons from /etc/rc if it is set @ text @d523 1 a523 1 . /etc/rc.wscons @ 1.116 log @No need to involve awk in the securelevel part, since sysctl has the -n switch. Pointed out by NAKAJIMA Yoshihiro. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.115 1999/02/07 00:47:08 bad Exp $ d519 5 @ 1.115 log @Use peers too when setting the time via ntpdate. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.114 1999/02/06 23:22:31 frueauf Exp $ d321 1 a321 1 securelevel=`sysctl kern.securelevel | awk '{ print $3 }'` @ 1.114 log @Add missing '' for awk in the securelevel part. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.113 1999/02/01 00:34:25 mrg Exp $ d198 1 a198 1 /^server/ {print $2} @ 1.113 log @oops, that's -n not -z. pointed out by hubert... @ text @d1 1 a1 1 # $NetBSD: rc,v 1.112 1999/01/31 08:46:58 mrg Exp $ d321 1 a321 1 securelevel=`sysctl kern.securelevel | awk { print $3 }` @ 1.112 log @increase the securelevel (using the same rules as before) much earlier in the boot process. before cron, sendmail, inetd, etc, are run, but after lkms are loaded. this avoids the chances of `@@reboot', mail .forwards, remote logins, etc., happening before the securelevel has been raised. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.111 1999/01/12 12:42:46 mrg Exp $ d317 1 a317 1 if [ -z "$securelevel" ]; then @ 1.111 log @support dmesg=NO and dmesg_flags, and do not cut the old boot messages..they might be useful. fix a typo (rbootd is not rarpd) @ text @d1 1 a1 1 # $NetBSD: rc,v 1.110 1999/01/12 04:58:37 jwise Exp $ d315 13 d345 1 @ 1.110 log @Enable cron to be turned on and off from rc.conf, like other daemons. From Soren S. Jorvang , closes his PR bin/5250. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.109 1999/01/11 21:04:38 jwise Exp $ d155 5 a159 2 # save a copy of the boot messages dmesg | sed -n -e '1,$H' -e '/^NetBSD/h' -e '$g' -e '$p' > /var/run/dmesg.boot d463 1 a463 1 "rarpd not started." @ 1.109 log @Add $portmap_flags variable, now that portmap has optional flags, and by default, pass '-l' flag (libwrap logging) by analogy with inetd @ text @d1 1 a1 1 # $NetBSD: rc,v 1.108 1999/01/06 03:41:44 abs Exp $ d370 3 a372 1 echo -n ' cron'; cron @ 1.108 log @save a copy of the boot messages. Closes 6398 from msanders@@confusion.net @ text @d1 1 a1 1 # $NetBSD: rc,v 1.107 1999/01/04 00:49:36 tron Exp $ d209 1 a209 1 echo -n ' portmap'; portmap @ 1.107 log @Add support for RAIDframe configuration as suggested by Eric S. Hvozda in PR install/6676. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.106 1998/11/21 03:00:38 hubertf Exp $ d154 3 @ 1.106 log @allow /var/crash to be a symlink to a directory @ text @d1 1 a1 1 # $NetBSD: rc,v 1.105 1998/07/12 19:51:55 augustss Exp $ d23 8 @ 1.105 log @Add USB support. Supported so far: * UHCI and OHCI host controllers on PCI * Hubs * HID devices withe special drivers for mouse and keyboard * Printers @ text @d1 1 a1 1 # $NetBSD: rc,v 1.104 1998/06/21 16:38:38 tron Exp $ d167 1 a167 1 if [ -d /var/crash ]; then @ 1.104 log @Strip comments from "${amd_master}". @ text @d1 1 a1 1 # $NetBSD: rc,v 1.103 1998/04/07 04:47:33 mrg Exp $ d471 4 @ 1.103 log @add "screenblank" support. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.102 1998/02/24 00:24:45 lukem Exp $ d274 2 a275 2 amd $amd_flags -p -a $amd_dir `cat $amd_master` \ > /var/run/amd.pid @ 1.102 log @send ntpdate output to syslog rather than stdout (with -s). suggested by "Soren S. Jorvang" @ text @d1 1 a1 1 # $NetBSD: rc,v 1.101 1998/02/23 05:20:52 lukem Exp $ d457 4 @ 1.101 log @exclude 127.127 servers when automagically determining ntpdate hosts @ text @d1 1 a1 1 # $NetBSD: rc,v 1.100 1998/01/26 12:02:50 lukem Exp $ d189 1 a189 1 ntpdate -b $ntpdate_hosts @ 1.100 log @include rc.subr and use appropriately @ text @d1 1 a1 1 # $NetBSD: rc,v 1.99 1998/01/24 19:12:55 veego Exp $ d182 4 a185 1 ntpdate_hosts=`awk '/^server/ {print $2}' /dev/null && \ echo "WARNING: no swap space configured!" fi @ 1.94 log @add $ipmon and $ipmon_flags, to control startup of ipmon(8) @ text @d1 1 a1 1 # $NetBSD: rc,v 1.93 1997/09/12 10:36:04 drochner Exp $ d107 13 a119 4 if [ ! -d /usr/bin ]; then mount /usr >/dev/null 2>&1 fi mount /var >/dev/null 2>&1 @ 1.93 log @fix an rc.conf flag check which was broken with the "checkyesno" changes @ text @d1 1 a1 1 # $NetBSD: rc,v 1.92 1997/09/12 09:53:08 drochner Exp $ d131 7 @ 1.92 log @avoid to mount /usr twice if LKM load already did it @ text @d1 1 a1 1 # $NetBSD: rc,v 1.91 1997/09/08 02:34:44 mikel Exp $ d92 1 a92 1 if [ "$lkm_init" != NO ] && [ -f /etc/rc.lkm ]; then @ 1.91 log @no more DEFAULT for $ntpdate_hosts; from Geoff Wing in PR bin/4073 @ text @d1 1 a1 1 # $NetBSD: rc,v 1.90 1997/08/29 09:33:34 veego Exp $ d107 3 a109 1 mount /usr >/dev/null 2>&1 @ 1.90 log @Curt, what is in rc.func ? I only see rc.subr so I renamed rc.func to rc.subr. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.89 1997/08/29 02:24:05 cjs Exp $ d148 1 a148 1 if [ "$ntpdate_hosts" = DEFAULT ]; then @ 1.89 log @Split rc.conf variables for starting programs into two: an on/off switch and a set of flags. Get rid of DEFAULT flags entirely. Print warnings if on/off switches are not set, or are set incorrectly. Add a shell function to simplify this on/off switch testing. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.85 1997/07/31 03:35:39 perry Exp $ d70 2 a71 2 if [ -f /etc/rc.func ]; then . /etc/rc.func d73 1 a73 1 echo "Can't read /etc/rc.func; aborting." d202 1 a202 1 echo -n 'starting nfs-rpc daemons:' @ 1.88 log @ldconfig processes /etc/ld.so.conf internally; run it without cat'ing the contents into an argument vector. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.87 1997/08/05 03:32:51 cjs Exp $ d70 7 d81 5 d125 1 a125 4 if [ "$syslogd_flags" != NO ]; then if [ "$syslogd_flags" = DEFAULT ]; then syslogd_flags="" fi d133 6 a138 3 if [ "$savecore_flags" != NO ] && [ -d /var/crash ]; then if [ "$savecore_flags" = DEFAULT ]; then savecore_flags="" a139 2 echo checking for core dump... savecore $savecore_flags /var/crash d142 12 a153 3 if [ "$named_flags" != NO ]; then if [ "$named_flags" = DEFAULT ]; then named_flags="" a154 1 echo 'starting name server'; named $named_flags d161 1 a161 1 if [ "$portmap" != NO ]; then d165 1 a165 4 if [ "$ypserv_flags" != NO ]; then if [ "$ypserv_flags" = DEFAULT ]; then ypserv_flags="-d" fi d169 1 a169 4 if [ "$ypbind_flags" != NO ]; then if [ "$ypbind_flags" = DEFAULT ]; then ypbind_flags="" fi d173 1 a173 4 if [ "$yppasswdd_flags" != NO ]; then if [ "$yppasswdd_flags" = DEFAULT ]; then yppasswdd_flags="" fi d177 7 a183 3 if [ "$bootparamd_flags" != NO ] && [ -r /etc/bootparams ]; then if [ "$bootparamd_flags" = DEFAULT ]; then bootparamd_flags="" a184 1 echo -n ' rpc.bootparamd'; rpc.bootparamd $bootparamd_flags d190 7 a196 3 if [ "$lkm_init" != NO ] && [ -f /etc/rc.lkm ]; then lkmstage=BEFOREMOUNT . /etc/rc.lkm d206 11 a216 9 if [ "$nfs_server" = YES ] && [ -r /etc/exports ]; then if [ "$mountd_flags" = DEFAULT ]; then mountd_flags="" fi rm -f /var/db/mountdtab echo -n > /var/db/mountdtab echo -n ' mountd'; mountd $mountd_flags if [ "$nfsd_flags" = DEFAULT ]; then nfsd_flags="-tun 4" a217 2 echo -n ' nfsd'; nfsd $nfsd_flags nfs_locking=MAYBE d220 1 a220 4 if [ "$nfs_client" = YES ]; then if [ "$nfsiod_flags" = DEFAULT ]; then nfsiod_flags="-n 4" fi d226 1 a226 4 if [ "$statd_flags" != NO ]; then if [ "$statd_flags" = DEFAULT ]; then statd_flags="" fi d229 1 a229 5 if [ "$lockd_flags" != NO ]; then if [ "$lockd_flags" = DEFAULT ]; then lockd_flags="" fi d234 15 a248 3 if [ "$amd_flags" != NO ] && [ -d "$amd_dir" -a -r "$amd_master" ]; then if [ "$amd_flags" = DEFAULT ]; then amd_flags="-l syslog -x error,noinfo,nostats" a249 2 echo -n ' amd' amd $amd_flags -p -a $amd_dir `cat $amd_master` > /var/run/amd.pid d260 1 a260 1 if [ "$lkm_init" != NO ] && [ -f /etc/rc.lkm ]; then d265 1 a265 3 echo -n 'checking quotas:' quotacheck -a echo ' done.' d301 1 a301 1 if [ "$update_motd" != NO ]; then d320 1 a320 4 if [ "$update_flags" != NO ]; then if [ "$update_flags" = DEFAULT ]; then update_flags="30" fi a325 11 # set time, if requested if [ "$ntpdate_hosts" != NO ]; then if [ "$ntpdate_hosts" = DEFAULT ]; then ntpdate_hosts=`awk '/^server/ {print $2}' you can not use lkm's if you have /usr on a nfs partition. # This is because of /etc/rc.lkm has to be come before /etc/netstart # to load possible network lkm's. mount -t nonfs /usr >/dev/null 2>&1 # Load any kernel modules specified in /etc/lkm.conf d90 1 a90 3 # Mount a possible /usr on nfs partition and then mount a possible /var # partition. mount -t nfs /usr >/dev/null 2>&1 d208 1 a208 1 mount -a @ 1.80 log @Mount only "/" at the beginning (instead of all non-NFS filesystems). This makes that the ordering of fstab is used for mounts which is a) more intuitive and b) needed if {mfs,union,...} on top of NFS is wanted. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.79 1997/06/25 23:30:28 thorpej Exp $ d78 7 a84 1 # load any kernel modules specified in /etc/lkm.conf d96 3 a98 1 mount /usr >/dev/null 2>&1 @ 1.79 log @Before disk checks are performed, do a "swapctl -A -t blk" so that block-type devices are available during disk checks, which may consume large amounts of memory if large file systems are present. Once "critical" file systems (e.g. /usr and /var) are mounted, perform a "swapctl -A -t noblk" to enable swapping on any swap files that may be listed in /etc/fstab. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.78 1997/06/12 15:18:58 mrg Exp $ d67 1 a67 1 mount -a -t nonfs d208 1 a208 1 mount -a -t nfs @ 1.78 log @use swapctl instead of swapon @ text @d1 1 a1 1 # $NetBSD: rc,v 1.77 1997/05/11 05:08:16 cjs Exp $ d24 4 a65 2 swapctl -A d92 5 @ 1.77 log @Make xntpd put its pid in /var/run/xntpd.pid. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.76 1997/04/29 04:58:38 scottr Exp $ d62 1 a62 1 swapon -a @ 1.76 log @Spawn a separate shell for netstart, making sure to check the return value and exit with error if appropriate. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.75 1997/04/27 23:17:56 perry Exp $ d330 1 a330 1 xntpd_flags="" @ 1.75 log @Add support for an ntpdate_hosts variable. settings: NO: don't run ntpdate on boot DEFAULT:extract a list of hosts from /etc/ntp.conf otherwise, a list of hosts to poll with ntpdate @ text @d1 1 a1 1 # $NetBSD: rc,v 1.74 1997/04/23 01:24:22 perry Exp $ d83 4 a86 1 . /etc/netstart @ 1.74 log @make motd update conditional on an rc.conf variable (update_motd), and move it before interactive logins are possible (just in case). @ text @d1 1 a1 1 # $NetBSD: rc,v 1.73 1997/04/19 03:10:57 perry Exp $ d312 11 @ 1.73 log @move last items from rc.local to rc; rc.local is now actually for local stuff. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.72 1997/03/17 00:05:12 cjs Exp $ d254 17 a383 13 # Hack the Message Of The Day if [ ! -f /etc/motd ]; then install -c -o root -g wheel -m 664 /dev/null /etc/motd fi T=/tmp/_motd rm -f $T sysctl -n kern.version | sed 1q > $T echo "" >> $T sed '1,/^$/d' < /etc/motd >> $T cmp -s $T /etc/motd || cp $T /etc/motd rm -f $T @ 1.72 log @Added mopd. @ text @d1 2 a2 2 # $NetBSD: rc,v 1.71 1997/03/12 19:21:26 mycroft Exp $ # from: @@(#)rc 8.2 (Berkeley) 3/17/94 d359 21 @ 1.71 log @When displaying the names for statd and lockd, include the `rpc.'. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.70 1997/03/12 19:15:16 mycroft Exp $ d342 7 @ 1.70 log @Add . GC , which isn't used. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.69 1997/03/10 10:15:11 mycroft Exp $ d68 1 a68 1 if [ -s /etc/rc.conf ]; then d178 1 a178 1 echo -n ' statd'; rpc.statd $statd_flags d185 1 a185 1 echo -n ' lockd'; rpc.lockd $lockd_flags d202 1 a202 1 if [ -s /etc/ld.so.conf ]; then @ 1.69 log @Do the DEFAULT thing with mountd_flags. Don't output an extra newline for statd and lockd. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.68 1997/03/10 09:34:59 mycroft Exp $ d259 6 a264 1 echo -n ' update'; update @ 1.68 log @Minor cleanup. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.67 1997/03/10 09:16:13 mycroft Exp $ d152 2 a153 2 if [ "$nfsd_flags" = DEFAULT ]; then nfsd_flags="-tun 4" d158 3 d178 1 a178 1 echo ' statd'; rpc.statd $statd_flags d185 1 a185 1 echo ' lockd'; rpc.lockd $lockd_flags @ 1.67 log @If foo_flags is DEFAULT, run the program with a default set of flags. Most users will use this, and therefore will never have to worry about flags changing between releases. It's also a bit less error-prone. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.66 1997/03/10 06:32:37 scottr Exp $ d16 2 a17 3 HOME=/; export HOME PATH=/sbin:/bin:/usr/sbin:/usr/bin export PATH d26 1 a26 1 elif [ $1x = autobootx ]; then @ 1.66 log @Add configuration flags for lockd/statd, and start them if an NFS server or client is configured and the flags are not NO. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.65 1997/02/15 10:02:25 mikel Exp $ d78 1 a78 1 if [ X"$lkm_init" != XNO -a -f /etc/rc.lkm ]; then d98 4 a101 1 if [ "X$syslogd_flags" != XNO ]; then d107 4 a110 1 if [ "X$named_flags" != XNO ]; then d118 1 a118 1 if [ "X$portmap" != XNO ]; then d122 4 a125 1 if [ "X$ypserv_flags" != XNO ]; then d129 4 a132 1 if [ "X$ypbind_flags" != XNO ]; then d136 4 a139 1 if [ "X$yppasswdd_flags" != XNO ]; then d143 4 a146 1 if [ "X$bootparamd_flags" != XNO -a -r /etc/bootparams ]; then d150 4 a153 2 if [ "X$nfs_server" = XYES -a -r /etc/exports ]; then if [ "X$nfsd_flags" = X ]; then d160 1 d163 2 a164 2 if [ "X$nfs_client" = XYES ]; then if [ "X$nfsiod_flags" = X ]; then d168 1 d171 5 a175 2 if [ "X$nfs_server" = XYES -a -r /etc/exports -o "X$nfs_client" = XYES ]; then if [ "X$statd_flags" != XNO ]; then d179 4 a182 1 if [ "X$lockd_flags" != XNO ]; then d187 4 a190 1 if [ "X$amd" = XYES -a -d "$amd_dir" -a -r "$amd_master" ]; then d209 4 a212 1 if [ X"$savecore_flags" != XNO -a -d /var/crash ]; then d264 4 a267 1 if [ X$gated_flags != XNO -a -r /etc/gated.conf ]; then d269 4 a272 1 elif [ "X$routed_flags" != XNO ]; then d276 4 a279 1 if [ "X$mrouted_flags" != XNO ]; then d283 5 a287 2 if [ "X$timed_flags" != XNO ]; then echo -n ' time daemon'; timed $timed_flags d290 5 a294 2 if [ "X$xntpd_flags" != XNO ]; then echo -n ' ntp daemon'; xntpd $xntpd_flags d297 4 a300 1 if [ "X$dhcpd_flags" != XNO -a -r /etc/dhcpd.conf ]; then d304 1 a304 1 if [ X$rwhod = XYES ]; then d308 4 a311 1 if [ "X$lpd_flags" != XNO ]; then d316 4 a319 1 if [ "X$sendmail_flags" != XNO -a -r /etc/sendmail.cf ]; then d323 4 a326 1 if [ "X$rarpd_flags" != XNO -a -r /etc/ethers ]; then d330 4 a333 1 if [ "X$rbootd_flags" != XNO -a -r /etc/rbootd.conf ]; then d337 4 a340 1 if [ "X$inetd_flags" != XNO -a -r /etc/inetd.conf ]; then @ 1.65 log @cleanup Lite-1 merge @ text @d1 1 a1 1 # $NetBSD: rc,v 1.64 1997/02/07 08:59:18 mrg Exp $ d147 10 @ 1.64 log @oops; use $savecore_flags. from kilbi@@rad.rwth-aachen.de @ text @d1 1 a1 1 # $NetBSD: rc,v 1.63 1997/01/05 12:01:55 mrg Exp $ d202 2 a203 2 # prune quickly with one rm, then use find to clean up /tmp/[lq]* # (not needed with mfs /tmp, but doesn't hurt there...) @ 1.63 log @move start-time configuration from netstart, rc, rc.local into the new /etc/rc.conf. this also includes the following changes: netstart: ifaliases now includes a netmask, to ensure aliases work. rc/rc.local: make _everything_ based on configuration in rc.conf. also move things around such that DNS and YP are started early enough that other daemons needing their services also exist. move ldconfig from rc.local here, and also make it use /etc/ld.so.conf if it exists. run /etc/rc.lkm if it exists, a boot time. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.62 1996/12/04 12:55:33 mrg Exp $ d168 1 a168 1 if [ X"savecore_flags" != XNO -a -d /var/crash ]; then @ 1.62 log @add inetd_flags, mostly from in pr#2987 @ text @d1 1 a1 1 # $NetBSD: rc,v 1.61 1996/10/03 07:11:35 mrg Exp $ d21 1 a21 2 if [ -f /etc/ccd.conf ] then d25 1 a25 2 if [ -e /fastboot ] then d27 1 a27 2 elif [ $1x = autobootx ] then d69 4 d77 5 d95 45 a139 8 echo -n 'starting system logger' rm -f /dev/log syslogd # $timed_flags is imported from /etc/netstart; # if $timed_flags == NO, timed isn't run. if [ "X${timed_flags}" != X"NO" ]; then echo -n ', time daemon'; timed $timed_flags d141 13 d155 10 d168 1 a168 1 if [ -d /var/crash ]; then d170 1 a170 1 savecore /var/crash d217 1 d220 1 a220 4 # $gated and $routed_flags are imported from /etc/netstart. # If $gated == YES, gated is used; otherwise routed. # If $routed_flags == NO, routed isn't run. if [ X${gated} = X"YES" -a -r /etc/gated.conf ]; then d222 1 a222 1 elif [ "X${routed_flags}" != X"NO" ]; then d226 1 a226 3 # $mrouted_flags is imported from /etc/netstart; # If $mrouted_flags == NO, then mrouted isn't run. if [ "X${mrouted_flags}" != X"NO" ]; then d230 6 a235 4 # $named_flags is imported from /etc/netstart; # if $named_flags != NO, named is run. if [ "X${named_flags}" != X"NO" ]; then echo -n ' named'; named $named_flags d238 1 a238 3 # $dhcpd_flags is imported from /etc/netstart; # if $dhcpd_flags != NO, dhcpd is run. if [ "X${dhcpd_flags}" != X"NO" -a -r /etc/dhcpd.conf ]; then d242 1 a242 3 # $rwhod is imported from /etc/netstart; # if $rwhod == YES, rwhod is run. if [ X${rwhod} = X"YES" ]; then d246 2 a247 29 echo -n ' printer'; lpd # $sendmail_flags is imported from /etc/netstart; # If $sendmail_flags == NO or /etc/sendmail.cf doesn't exist, then # sendmail isn't run. We call sendmail with a full path so that # SIGHUP works. if [ "X${sendmail_flags}" != X"NO" -a -r /etc/sendmail.cf ]; then echo -n ' sendmail'; /usr/sbin/sendmail ${sendmail_flags} fi # $inetd_flags is imported from /etc/netstart; # If $inetd_flags == NO or /etc/inetd.conf doesn't exist, then # inetd isn't run. if [ "X${inetd_flags}" != X"NO" -a -r /etc/inetd.conf ]; then echo -n ' inetd'; inetd ${inetd_flags} fi # $rarpd_flags is imported from /etc/netstart; # If $rarpd_flags == NO or /etc/ethers doesn't exist, then # rarpd isn't run. if [ "X${rarpd_flags}" != X"NO" -a -r /etc/ethers ]; then echo -n ' rarpd'; rarpd ${rarpd_flags} fi # $rbootd_flags is imported from /etc/netstart; # If $rbootd_flags == NO or /etc/rbootd.conf doesn't exist, then # rbootd isn't run. if [ "X${rbootd_flags}" != X"NO" -a -r /etc/rbootd.conf ]; then echo -n ' rbootd'; rbootd ${rbootd_flags} d250 3 a252 18 echo '.' echo -n 'starting rpc daemons:' echo -n ' portmap'; portmap # $bootparamd_flags is imported from /etc/netstart; # If $bootparamd_flags == NO or /etc/bootparams doesn't exist, then # bootparamd isn't run. if [ "X${bootparamd_flags}" != X"NO" -a -r /etc/bootparams ]; then echo -n ' rpc.bootparamd'; rpc.bootparamd ${bootparamd_flags} fi if [ "X${ypserv_flags}" != X"NO" ]; then echo -n ' ypserv'; ypserv ${ypserv_flags} fi if [ "X${yppasswdd_flags}" != X"NO" ]; then echo -n ' rpc.yppasswdd'; rpc.yppasswdd ${yppasswdd_flags} d255 2 a256 2 if [ "X${ypbind_flags}" != X"NO" ]; then echo -n ' ypbind'; ypbind ${ypbind_flags} d259 2 a260 13 # $nfs_server is imported from /etc/netstart; # if $nfs_server == YES, the machine is setup for being an nfs server if [ X${nfs_server} = X"YES" -a -r /etc/exports ]; then rm -f /var/db/mountdtab echo -n > /var/db/mountdtab echo -n ' mountd'; mountd echo -n ' nfsd'; nfsd -tun 4 fi # $nfs_client is imported from /etc/netstart; # if $nfs_client == YES, the machine is setup for being an nfs client if [ X${nfs_client} = X"YES" ]; then echo -n ' nfsiod'; nfsiod -n 4 d263 2 a264 4 if [ X${amd} = X"YES" -a -d ${amd_dir} -a -r ${amd_master} ]; then echo -n ' amd' amd -l syslog -x error,noinfo,nostats -p \ -a ${amd_dir} `cat ${amd_master}` > /var/run/amd.pid a267 1 mount -a -t nfs @ 1.61 log @add dhcpd startup; disabled by default @ text @d1 1 a1 1 # $NetBSD: rc,v 1.60 1996/08/26 06:02:21 tls Exp $ d196 6 a201 1 echo -n ' inetd'; inetd @ 1.60 log @move rpc daemon startup to after network startup so that if the machine is a DNS server and wants to resolve via itself, one doesn't have to wait for all the DNS queries to time out as each rpc daemon starts. This was particularly ugly with mountd. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.59 1996/08/09 16:07:42 thorpej Exp $ d172 6 @ 1.59 log @Quote the YP daemon flags variables. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.58 1996/08/09 10:29:48 thorpej Exp $ a88 39 echo -n 'starting rpc daemons:' echo -n ' portmap'; portmap if [ "X${ypserv_flags}" != X"NO" ]; then echo -n ' ypserv'; ypserv ${ypserv_flags} fi if [ "X${yppasswdd_flags}" != X"NO" ]; then echo -n ' rpc.yppasswdd'; rpc.yppasswdd ${yppasswdd_flags} fi if [ "X${ypbind_flags}" != X"NO" ]; then echo -n ' ypbind'; ypbind ${ypbind_flags} fi # $nfs_server is imported from /etc/netstart; # if $nfs_server == YES, the machine is setup for being an nfs server if [ X${nfs_server} = X"YES" -a -r /etc/exports ]; then rm -f /var/db/mountdtab echo -n > /var/db/mountdtab echo -n ' mountd'; mountd echo -n ' nfsd'; nfsd -tun 4 fi # $nfs_client is imported from /etc/netstart; # if $nfs_client == YES, the machine is setup for being an nfs client if [ X${nfs_client} = X"YES" ]; then echo -n ' nfsiod'; nfsiod -n 4 fi if [ X${amd} = X"YES" -a -d ${amd_dir} -a -r ${amd_master} ]; then echo -n ' amd' amd -l syslog -x error,noinfo,nostats -p \ -a ${amd_dir} `cat ${amd_master}` > /var/run/amd.pid fi echo '.' mount -a -t nfs d199 12 d215 28 a242 1 echo -n ' rpc.bootparamd'; rpc.bootparamd ${bootparamd_flags} d245 4 a248 5 # $rbootd_flags is imported from /etc/netstart; # If $rbootd_flags == NO or /etc/rbootd.conf doesn't exist, then # rbootd isn't run. if [ "X${rbootd_flags}" != X"NO" -a -r /etc/rbootd.conf ]; then echo -n ' rbootd'; rbootd ${rbootd_flags} d252 1 @ 1.58 log @Change how the YP daemons are started. Previously, ypbind was always started if the directory /var/yp exists. Now, ypbind, ypserv, and rpc.yppasswdd are started like other daemons; there are flags variables for these programs. To disable them, set the variables to "NO", otherwise, their contents are passed as flags. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.57 1996/03/22 03:20:53 mrg Exp $ d92 1 a92 1 if [ X${ypserv_flags} != X"NO" ]; then d96 1 a96 1 if [ X${yppasswdd_flags} != X"NO" ]; then d100 1 a100 1 if [ X${ypbind_flags} != X"NO" ]; then @ 1.57 log @add note about why we use /usr/sbin/sendmail. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.56 1996/03/22 00:44:59 mrg Exp $ d92 10 a101 2 if [ -f /usr/sbin/ypbind -a -d /var/yp ]; then echo -n ' ypbind'; ypbind @ 1.56 log @now that sendmail supports SIGHUP, call sendmail with full path. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.55 1995/12/30 01:30:05 thorpej Exp $ d215 2 a216 1 # sendmail isn't run. @ 1.55 log @Add $mrouted_flags to netstart and use it in rc to start mrouted in a manner similar (well, identical, really) to how $routed_flags is used to start routed. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.54 1995/10/08 18:11:43 thorpej Exp $ d217 1 a217 1 echo -n ' sendmail'; sendmail ${sendmail_flags} @ 1.54 log @New-style RCS ids. @ text @d1 1 a1 1 # $NetBSD: rc,v 1.53 1995/09/16 15:29:20 jtc Exp $ d193 7 a199 1 # $name_flags is imported from /etc/netstart; @ 1.53 log @fix typo in comment @ text @d1 1 a2 1 # $Id: rc,v 1.52 1995/09/02 17:30:43 thorpej Exp $ @ 1.52 log @Conditionally start rbootd like rarpd and rpc.bootparamd, and disable it by default. @ text @d2 1 a2 1 # $Id: rc,v 1.51 1995/09/02 17:19:22 thorpej Exp $ d193 1 a193 1 # $name_server is imported from /etc/netstart; @ 1.51 log @Fix typos in two comments. @ text @d2 1 a2 1 # $Id: rc,v 1.50 1995/08/27 20:30:53 thorpej Exp $ d228 7 @ 1.50 log @Configure ccd devices before the filesystem checks, as suggested by Thomas Eberhardt in PR #1408. @ text @d2 1 a2 1 # $Id: rc,v 1.49 1994/11/04 13:27:32 briggs Exp $ d216 1 a216 1 # $rarpd_flags is importent from /etc/netstart; d223 1 a223 1 # $bootparamd_flags is importent from /etc/netstart; @ 1.49 log @Actually pass all the arguments to amd that we meant to. Reported by Dave Leonard (D.Leonard@@pleiades.newcastle.edu.au). @ text @d2 1 a2 1 # $Id: rc,v 1.48 1994/09/16 23:38:01 mycroft Exp $ d19 6 @ 1.48 log @Create an empty mountdtab after removing it, to avoid getting a warning from mountd on startup. Change $name_server to $named_flags. @ text @d2 1 a2 1 # $Id: rc,v 1.47 1994/06/27 21:14:19 deraadt Exp $ d107 2 a108 2 amd -l syslog -x error,noinfo,nostats -p > /var/run/amd.pid \ -a ${amd_dir} `cat ${amd_master}` @ 1.47 log @always check quotas (there is no reason not to try) @ text @d2 1 a2 1 # $Id: rc,v 1.46 1994/06/24 07:51:59 deraadt Exp $ d94 1 d182 1 a182 1 echo -n ' gated'; gated $gated_flags d184 1 a184 1 echo -n ' routed'; routed $routed_flags d188 3 a190 3 # if $name_server == YES, named is run. if [ X${name_server} = X"YES" -a -r /etc/named.boot ]; then echo -n ' named'; named d196 1 a196 1 echo -n ' rwhod'; rwhod a228 1 @ 1.46 log @quotas file(s) changed name in 4.4-lite @ text @d2 1 a2 1 # $Id: rc,v 1.45 1994/06/18 06:38:54 cgd Exp $ d131 4 a134 4 # echo -n 'checking quotas:' #quotacheck -a # echo ' done.' #quotaon -a @ 1.45 log @if install will do the trick, why not use it\? @ text @d2 1 a2 1 # $Id: rc,v 1.44 1994/06/08 18:47:45 mycroft Exp $ d163 2 a164 2 find . ! -name . ! -name lost+found ! -name quotas \ -exec rm -rf -- {} \; -type d -prune) @ 1.44 log @Update nfsd and nfsiod invocations. @ text @d1 2 a2 2 # @@(#)rc 5.27 (Berkeley) 6/5/91 # $Id: rc,v 1.43 1994/06/03 05:02:10 jtc Exp $ d81 1 a81 1 (cd /var/run && { rm -rf -- *; cp /dev/null utmp; chmod 644 utmp; }) @ 1.43 log @Move building of link editor cache from rc to rc.local, like in SunOS, because the end user may need to add local directories to be searched. And rc.local is a much more appropriate place for local changes. I emailed pk on this matter, and he said that the overhead of not having linker hints for the daemons started by rc would not be significant. This change also closes bug #217. @ text @d2 1 a2 1 # $Id: rc,v 1.42 1994/05/29 19:10:22 mycroft Exp $ d95 1 a95 1 echo -n ' nfsd'; nfsd -u 0,0,4 -t 0,0 d101 1 a101 1 echo -n ' nfsiod'; nfsiod 4 @ 1.42 log @Attempt to make sure /var is mounted before futzing with it. @ text @d2 1 a2 1 # $Id: rc,v 1.41 1994/05/29 03:37:33 jtc Exp $ a111 4 echo 'runtime link editor directory cache' rm -f /var/run/ld.so.hints ldconfig @ 1.41 log @Move code that cleans /var/run so that it is before the automount deamon startup puts its pid file there (This addressess most of bug #217). @ text @d2 1 a2 1 # $Id: rc,v 1.40 1994/04/10 06:42:40 cgd Exp $ d75 1 @ 1.40 log @add ttyflags -a, early on in rc. @ text @d2 1 a2 1 # $Id: rc,v 1.39 1994/03/28 05:47:28 cgd Exp $ d76 6 a110 6 # clean up left-over files rm -f /etc/nologin rm -f /var/spool/lock/LCK.* rm -f /var/spool/uucp/STST/* (cd /var/run && { rm -rf -- *; cp /dev/null utmp; chmod 644 utmp; }) @ 1.39 log @keep amd pid in /var/run/amd.pid @ text @d2 1 a2 1 # $Id: rc,v 1.38 1994/03/18 00:58:20 cgd Exp $ d65 4 @ 1.38 log @punctuation @ text @d2 1 a2 1 # $Id: rc,v 1.37 1994/03/17 23:22:40 cgd Exp $ d95 2 a96 1 amd -l syslog -x error,noinfo,nostats -a ${amd_dir} `cat ${amd_master}` @ 1.37 log @kill uucp lock files. from Mike Long @ text @d2 1 a2 1 # $Id: rc,v 1.36 1994/03/14 04:14:19 cgd Exp $ d22 1 a22 1 echo "Fast boot; skipping disk checks." d25 1 a25 1 echo "Automatic boot in progress..." d36 1 a36 1 echo "reboot failed... help!" d40 1 a40 1 echo "Automatic file system check failed... help!" d44 1 a44 1 echo "Boot interrupted" d52 1 a52 1 echo "Unknown error in reboot" d58 1 a58 1 trap "echo 'Boot interrupted'; exit 1" 3 @ 1.36 log @slight change to the way AMD is invoked, to make it sensible for most uses @ text @d2 1 a2 1 # $Id: rc,v 1.35 1994/03/09 04:02:58 cgd Exp $ d103 1 a103 1 rm -f /var/spool/uucp/LCK.* @ 1.35 log @make booting comments a bit cleaner @ text @d2 1 a2 1 # $Id: rc,v 1.34 1994/02/26 03:29:27 cgd Exp $ d93 1 a93 1 if [ X${amd} = X"YES" ]; then d95 1 a95 1 amd -x error,noinfo,nostats -a /tmp_mnt /home amd.home @ 1.34 log @automatically enable accounting and rotate logs @ text @d2 1 a2 1 # $Id: rc,v 1.33 1994/02/01 00:36:34 cgd Exp $ d22 1 a22 1 echo Fast boot ... skipping disk checks d25 1 a25 1 echo Automatic reboot in progress... d34 1 d44 1 a44 1 echo "Reboot interrupted" d58 1 a58 1 trap "echo 'Reboot interrupted'; exit 1" 3 @ 1.33 log @don't delete preserve files! @ text @d2 1 a2 1 # $Id: rc,v 1.32 1994/01/30 17:15:52 mycroft Exp $ d163 3 a165 1 #echo 'turning on accounting'; accton /var/account/acct @ 1.32 log @Do the right thing for nvi. @ text @d2 1 a2 1 # $Id: rc,v 1.31 1994/01/13 18:43:50 jtc Exp $ a151 1 rm -f $i @ 1.31 log @The cron daemon now lives in /usr/sbin @ text @d2 1 a2 1 # $Id: rc,v 1.30 1994/01/10 16:57:26 mycroft Exp $ d147 8 a154 4 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]*) @ 1.30 log @Add bootparamd gunk. @ text @d2 1 a2 1 # $Id: rc,v 1.29 1994/01/10 16:43:08 mycroft Exp $ d164 1 a164 1 echo -n ' cron'; /usr/libexec/cron @ 1.29 log @Add rarpd gunk. @ text @d2 1 a2 1 # $Id: rc,v 1.28 1994/01/05 21:35:25 jtc Exp $ a183 7 # $rarpd_flags is importent from /etc/netstart; # If $rarpd_flags == NO or /etc/ethers doesn't exist, then # rarpd isn't run. if [ "X${rarpd_flags}" != X"NO" -a -r /etc/ethers ]; then echo -n ' rarpd'; rarpd ${rarpd_flags} fi d200 15 @ 1.28 log @The cron daemon has been renamed from crond to cron. This name change is from Vixie Cron 3.0, to make it like the 4.3BSD cron. @ text @d2 1 a2 1 # $Id: rc,v 1.27 1994/01/05 06:34:56 deraadt Exp $ d182 7 @ 1.27 log @start amd if requested do nfs mounting after mountd has been started (so two machines can cross-mount nfs from each other, else they hang if booted simultaneously) @ text @d2 1 a2 1 # $Id: rc,v 1.26 1993/12/16 04:02:24 deraadt Exp $ d164 1 a164 1 echo -n ' crond'; /usr/libexec/crond @ 1.26 log @initialize rpc services in proper order @ text @d2 1 a2 1 # $Id: rc,v 1.25 1993/12/15 07:24:31 mycroft Exp $ a69 1 mount -a -t nfs >/dev/null 2>&1 d92 5 d98 1 @ 1.25 log @Use `.' to run rc.local, rather than starting another shell, so that variables from netstart are passed on. @ text @d1 2 a2 2 # From: @@(#)rc 5.27 (Berkeley) 6/5/91 # $Id: $ d69 25 a93 1 mount -a -t nfs >/dev/null 2>&1 & # XXX shouldn't need background a185 16 echo -n ' portmap'; portmap # $nfs_server is imported from /etc/netstart; # if $nfs_server == YES, the machine is setup for being an nfs server if [ X${nfs_server} = X"YES" -a -r /etc/exports ]; then rm -f /var/db/mountdtab echo -n ' mountd'; mountd echo -n ' nfsd'; nfsd -u 0,0,4 -t 0,0 fi # $nfs_client is imported from /etc/netstart; # if $nfs_client == YES, the machine is setup for being an nfs client if [ X${nfs_client} = X"YES" ]; then echo -n ' nfsiod'; nfsiod 4 fi @ 1.24 log @fix comment, add check @ text @d1 2 a2 1 # @@(#)rc 5.27 (Berkeley) 6/5/91 d189 1 a189 1 sh /etc/rc.local @ 1.23 log @Put ldconfig later so it doesn't get wiped when reaping /var/run. @ text @d179 3 a181 2 # If $sendmail_flags == NO, routed isn't run. if [ "X${sendmail_flags}" != X"NO" ]; then @ 1.22 log @Build ld.so.hints on each boot. @ text @a63 4 echo 'runtime link editor directory cache' rm -f /var/run/ld.so.hints ldconfig d75 4 @ 1.21 log @more flags @ text @d64 4 @ 1.20 log @quote sendmail_flags test, from Patrick Bridges @ text @d82 1 a82 1 if [ X${timed_flags} != X"NO" ]; then d140 1 a140 1 elif [ X${routed_flags} != X"NO" ]; then @ 1.19 log @(1) clean up lots (rename fooflags -> foo_flags, etc.) (2) implement suggestion made by Garrett Wollman of "sendmail flags" to set flags passed to sendmail and/or turn it off (3) document origins of variables @ text @d176 1 a176 1 if [ X${sendmail_flags} != X"NO" ]; then @ 1.18 log @never rotate accounting logs, and turn on accounting the way done in net/2 @ text @d80 4 a83 4 # $timedflags is imported from /etc/netstart; # if $timedflags == NO, timed isn't run. if [ X${timedflags} != X"NO" ]; then echo -n ', time daemon'; timed $timedflags d135 1 a135 1 # $gated and $routedflags are imported from /etc/netstart. d137 1 a137 1 # If $routedflags == NO, routed isn't run. d139 3 a141 3 echo -n ' gated'; gated $gatedflags elif [ X${routedflags} != X"NO" ]; then echo -n ' routed'; routed $routedflags d144 2 d160 1 d168 1 d174 6 a179 1 echo -n ' sendmail'; sendmail -bd -q30m @ 1.17 log @Use `-e fastboot', not `-r fastboot'. @ text @d126 1 a126 5 if [ -d /var/account ]; then echo 'turning on accounting' accountant accton fi @ 1.16 log @it's clear that mountd started from inetd doesn't work @ text @d19 1 a19 1 if [ -r /fastboot ] @ 1.15 log @mountd is now started by inetd. @ text @d165 1 a165 2 # Started by inetd #echo -n ' mountd'; mountd @ 1.14 log @Don't start rwalld - now started by inetd. @ text @d165 2 a166 1 echo -n ' mountd'; mountd @ 1.13 log @prune dirs rm'd when cleaning tmp @ text @a173 6 # $rwalld is imported from /etc/netstart; # if $rwalld == YES, rwalld is run. if [ X${rwalld} = X"YES" ]; then echo -n ' rwalld'; rwalld fi @ 1.12 log @turn on accounting if /var/account exists @ text @d123 2 a124 1 find . ! -name . ! -name lost+found ! -name quotas -exec rm -rf -- {} \;) @ 1.11 log @bsd->netbsd @ text @d125 5 a129 1 # echo 'turning on accounting'; accton /var/account/acct @ 1.10 log @new kernel is bsd @ text @d101 1 a101 1 kvm_mkdb /bsd @ 1.9 log @fixes for nfs_client, nfs_server division. @ text @d101 1 a101 1 kvm_mkdb /386bsd @ 1.8 log @always run portmap @ text @d157 1 d162 4 @ 1.7 log @mountd's log of who has what filesystem mounted should not persist across reboots. @ text @d155 1 a156 1 a158 1 echo -n ' portmap'; portmap @ 1.6 log @rwalld should be run *after* the portmapper. @ text @d155 2 d158 1 @ 1.5 log @screwed it up again... = vs ==. @ text @a152 6 # $rwalld is imported from /etc/netstart; # if $rwalld == YES, rwalld is run. if [ X${rwalld} = X"YES" ]; then echo -n ' rwalld'; rwalld fi a154 1 d161 6 @ 1.4 log @screwed up comparison for rwalld and rwhod... @ text @d149 1 a149 1 if [ X${rwhod} == X"YES" ]; then d155 1 a155 1 if [ X${rwalld} == X"YES" ]; then @ 1.3 log @updated for addition of rwalld @ text @d149 1 a149 1 if [ X${rwhod} != X"YES" ]; then d155 1 a155 1 if [ X${rwalld} != X"YES" ]; then @ 1.2 log @got rid of damned highlight characters, and changed method to turn on rwhod. @ text @d153 6 @ 1.1 log @Initial revision @ text @a8 2 # yellow characters with blue background echo -n "" d100 1 d148 2 a149 2 # if $rwhod is set to something other than NO, rwhod is run. if [ ${rwhod-NO} != "NO" ]; then a170 2 # reset to normal (no colors) echo -n "" @ 1.1.1.1 log @initial import of 386bsd-0.1 sources @ text @@ 1.1.1.2 log @import 4.4BSD-Lite @ text @d1 1 a1 1 # @@(#)rc 8.2 (Berkeley) 3/17/94 d9 2 d23 1 a23 1 echo "Fast boot: skipping disk checks." d26 1 a26 1 echo "Automatic boot in progress: starting file system checks." a34 1 echo "Rebooting..." d36 1 a36 1 echo "Reboot failed; help!" d40 1 a40 1 echo "Automatic file system check failed; help!" d44 1 a44 1 echo "Boot interrupted." d52 1 a52 1 echo "Unknown error; help!" d58 1 a58 1 trap "echo 'Boot interrupted.'; exit 1" 3 d76 1 a76 1 (cd /var/run && { rm -rf -- *; install -c -m 664 -g utmp /dev/null utmp; }) d96 4 a99 4 echo -n 'checking quotas:' quotacheck -a echo ' done.' quotaon -a d102 1 a102 1 kvm_mkdb d115 3 a117 2 (cd /var/tmp && /usr/libexec/ex3.7preserve -a && rm -f Ex[0-9][0-9][0-9][0-9][0-9] Rx[0-9][0-9][0-9][0-9][0-9]) d121 2 a122 2 # Prune quickly with one rm, then use find to clean up /tmp/[lq]* (this # is not needed with mfs /tmp, but doesn't hurt anything). d124 1 a124 2 find . ! -name . ! -name lost+found ! -name quotas -type d -prune \ -exec rm -rf -- {} \;) d126 1 a126 1 echo 'turning on accounting'; accton /var/account/acct d130 1 a130 1 echo -n ' cron'; cron d144 3 a146 1 echo -n ' named'; named d156 7 a162 4 echo -n ' portmap'; portmap echo -n ' mountd'; mountd echo -n ' nfsd'; nfsd -u -t 6 echo -n ' nfsiod'; nfsiod 4 a165 6 echo -n ' amd'; cd /; amd -l /var/log/amd -r -a /amd -p > /var/run/amd.pid \ /home /etc/amd-home \ /n /etc/amd-n \ & d171 3 @