Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add some devfs code that's been sitting in my local tree for a while.

devfsd(8) is now the first daemon to be started after init(8). It tracks
device insertion (will eventually track removal) and devfs mounts.

Currently, we can mount multiple device file systems and have device
special files pushed into the mounts automatically, though, the device
special files aren't created with the correct major/minor number pairs
yet.

More work to come soon.
  • Loading branch information...
commit 2f565d846f43a4b88225cfcac00f06f9e9786405 1 parent 200fc02
mjf authored

Showing 51 changed files with 30,061 additions and 442 deletions. Show diff stats Hide diff stats

  1. +4,132 0 distrib/sets/lists/base/mi
  2. +12,571 0 distrib/sets/lists/comp/mi
  3. +351 0 distrib/sets/lists/etc/mi
  4. +5,097 0 distrib/sets/lists/man/mi
  5. +627 0 etc/Makefile
  6. +3 1 etc/defaults/rc.conf
  7. 0  sbin/devfsd/test.cfg → etc/devfsd.conf
  8. +2 2 etc/rc.d/Makefile
  9. +30 0 etc/rc.d/devfsd
  10. +2 1  etc/rc.d/wdogctl
  11. +2 1  sbin/Makefile
  12. +5 3 sbin/devfsd/Makefile
  13. +81 0 sbin/devfsd/devfsd.8
  14. +290 61 sbin/devfsd/devfsd.c
  15. +73 38 sbin/devfsd/devfsd.h
  16. +131 39 sbin/devfsd/devfsd_dev.c
  17. +82 0 sbin/devfsd/devfsd_mount.c
  18. +161 18 sbin/devfsd/devfsd_rule.c
  19. +3 3 sbin/devfsd/pathnames.h
  20. +17 0 sbin/mount_devfs/Makefile
  21. +134 0 sbin/mount_devfs/mount_devfs.8
  22. +212 0 sbin/mount_devfs/mount_devfs.c
  23. +5 1 sys/conf/files
  24. +2 1  sys/conf/majors
  25. +4 4 sys/dev/Makefile
  26. +8 0 sys/dev/dctl/Makefile
  27. +557 0 sys/dev/dctl/dctl.c
  28. +39 0 sys/dev/dctl/dctl.h
  29. +125 0 sys/dev/dctl/dctlio.h
  30. +47 0 sys/dev/dctl/dctlvar.h
  31. +4 0 sys/dev/dctl/files.dctl
  32. +0 7 sys/fs/devfs/Makefile
  33. +8 0 sys/fs/devfs/README
  34. +20 0 sys/fs/devfs/TODO
  35. +494 30 sys/fs/devfs/devfs.h
  36. +245 0 sys/fs/devfs/devfs_comm.c
  37. +38 0 sys/fs/devfs/devfs_comm.h
  38. +170 0 sys/fs/devfs/devfs_fifoops.c
  39. +130 0 sys/fs/devfs/devfs_fifoops.h
  40. +321 0 sys/fs/devfs/devfs_pool.c
  41. +148 0 sys/fs/devfs/devfs_pool.h
  42. +171 0 sys/fs/devfs/devfs_specops.c
  43. +131 0 sys/fs/devfs/devfs_specops.h
  44. +1,347 0 sys/fs/devfs/devfs_subr.c
  45. +400 73 sys/fs/devfs/devfs_vfsops.c
  46. +1,496 153 sys/fs/devfs/devfs_vnops.c
  47. +130 0 sys/fs/devfs/devfs_vnops.h
  48. +6 1 sys/fs/devfs/files.devfs
  49. +2 1  sys/sys/device.h
  50. +2 1  sys/sys/mount.h
  51. +5 3 sys/sys/vnode.h
4,132 distrib/sets/lists/base/mi
4,132 additions, 0 deletions not shown
12,571 distrib/sets/lists/comp/mi
12,571 additions, 0 deletions not shown
351 distrib/sets/lists/etc/mi
... ... @@ -0,0 +1,351 @@
  1 +# $NetBSD: mi,v 1.197.2.2 2008/02/18 22:07:01 mjf Exp $
  2 +#
  3 +# Note: end-user configuration files that are moved to another location
  4 +# should not be marked "obsolete"; they should just be removed from
  5 +# the set list, a custom fix should be added to postinstall(8), and
  6 +# an item should be added to src/UPDATING for MKUPDATE=yes users.
  7 +# This is an exception to the general rule that moved/removed files
  8 +# are marked as "obsolete", because we don't want to arbitrarily
  9 +# remove end-user configuration files.
  10 +#
  11 +./.cshrc etc-util-etc
  12 +./.profile etc-util-etc
  13 +./dev/MAKEDEV etc-sys-etc
  14 +./dev/MAKEDEV.local etc-sys-etc
  15 +./dev/MAKEDEV.subr etc-obsolete obsolete
  16 +./etc/atf/NetBSD.conf etc-atf-etc
  17 +./etc/atf/atf-run.hooks etc-atf-etc
  18 +./etc/audit-packages.conf etc-util-etc
  19 +./etc/bootptab etc-bootserver-etc
  20 +./etc/changelist etc-sys-etc
  21 +./etc/csh.cshrc etc-util-etc
  22 +./etc/csh.login etc-util-etc
  23 +./etc/csh.logout etc-util-etc
  24 +./etc/bluetooth etc-sys-etc
  25 +./etc/bluetooth/bluetooth.conf etc-obsolete obsolete
  26 +./etc/bluetooth/btdevctl.conf etc-sys-etc
  27 +./etc/bluetooth/btuartd.conf etc-sys-etc
  28 +./etc/bluetooth/hosts etc-sys-etc
  29 +./etc/bluetooth/protocols etc-sys-etc
  30 +./etc/daily etc-sys-etc
  31 +./etc/daily.conf etc-sys-etc
  32 +./etc/default etc-obsolete obsolete
  33 +./etc/default/daily.conf etc-obsolete obsolete
  34 +./etc/default/monthly.conf etc-obsolete obsolete
  35 +./etc/default/rc.conf etc-obsolete obsolete
  36 +./etc/default/security.conf etc-obsolete obsolete
  37 +./etc/default/weekly.conf etc-obsolete obsolete
  38 +./etc/defaults/daily.conf etc-sys-defaults
  39 +./etc/defaults/monthly.conf etc-sys-defaults
  40 +./etc/defaults/pf.boot.conf etc-pf-defaults pf
  41 +./etc/defaults/rc.conf etc-sys-defaults
  42 +./etc/defaults/security.conf etc-sys-defaults
  43 +./etc/defaults/weekly.conf etc-sys-defaults
  44 +./etc/devfsd.conf etc-sysutil-etc
  45 +./etc/dhclient-script etc-obsolete obsolete
  46 +./etc/disktab etc-sysutil-etc
  47 +./etc/dm.conf etc-games-etc
  48 +./etc/dumpdates etc-sysutil-etc
  49 +./etc/envsys.conf etc-sysutil-etc
  50 +./etc/floppytab etc-sysutil-etc
  51 +./etc/fstab.nfs etc-obsolete obsolete
  52 +./etc/fstab.sd etc-obsolete obsolete
  53 +./etc/fstab.sd0 etc-obsolete obsolete
  54 +./etc/fstab.sd1 etc-obsolete obsolete
  55 +./etc/fstab.sd2 etc-obsolete obsolete
  56 +./etc/fstab.sd3 etc-obsolete obsolete
  57 +./etc/fstab.sd4 etc-obsolete obsolete
  58 +./etc/fstab.sd5 etc-obsolete obsolete
  59 +./etc/fstab.sd6 etc-obsolete obsolete
  60 +./etc/fstab.sd7 etc-obsolete obsolete
  61 +./etc/fstab.tmp etc-obsolete obsolete
  62 +./etc/fstab.wd etc-obsolete obsolete
  63 +./etc/ftpchroot etc-netutil-etc
  64 +./etc/ftpusers etc-netutil-etc
  65 +./etc/gettytab etc-sysutil-etc
  66 +./etc/group etc-sys-etc
  67 +./etc/hosts etc-net-etc
  68 +./etc/hosts.equiv etc-netutil-etc
  69 +./etc/hosts.lpd etc-lpr-etc
  70 +./etc/inetd.conf etc-netutil-etc
  71 +./etc/iscsi/auths etc-iscsi-etc iscsi
  72 +./etc/iscsi/targets etc-iscsi-etc iscsi
  73 +./etc/lkm.conf etc-sys-etc
  74 +./etc/localtime etc-sys-etc
  75 +./etc/locate.conf etc-sys-etc
  76 +./etc/login.conf etc-sys-etc
  77 +./etc/mail.rc etc-mail-etc
  78 +./etc/mail/aliases etc-postfix-etc postfix
  79 +./etc/mailer.conf etc-mailwrapper-etc
  80 +./etc/man.conf etc-man-etc
  81 +./etc/master.passwd etc-sys-etc
  82 +./etc/moduli etc-secsh-etc crypto
  83 +./etc/monthly etc-sys-etc
  84 +./etc/monthly.conf etc-sys-etc
  85 +./etc/motd etc-sys-etc
  86 +./etc/mrouted.conf etc-router-etc
  87 +./etc/mtree/NetBSD.dist etc-sys-etc
  88 +./etc/mtree/set.etc etc-sys-etc
  89 +./etc/mtree/special etc-sys-etc
  90 +./etc/named.conf etc-bind-etc
  91 +./etc/namedb/127 etc-bind-etc
  92 +./etc/namedb/localhost etc-bind-etc
  93 +./etc/namedb/loopback.v6 etc-bind-etc
  94 +./etc/namedb/root.cache etc-bind-etc
  95 +./etc/netconfig etc-net-etc
  96 +./etc/networks etc-net-etc
  97 +./etc/newsyslog.conf etc-sysutil-etc
  98 +./etc/nsswitch.conf etc-net-etc
  99 +./etc/ntp.conf etc-ntp-etc
  100 +./etc/obsolete/base etc-obsolete obsolete
  101 +./etc/obsolete/comp etc-obsolete obsolete
  102 +./etc/obsolete/etc etc-obsolete obsolete
  103 +./etc/obsolete/games etc-obsolete obsolete
  104 +./etc/obsolete/man etc-obsolete obsolete
  105 +./etc/obsolete/misc etc-obsolete obsolete
  106 +./etc/obsolete/text etc-obsolete obsolete
  107 +./etc/pam.d/README etc-sys-etc
  108 +./etc/pam.d/display_manager etc-sys-etc
  109 +./etc/pam.d/ftpd etc-sys-etc
  110 +./etc/pam.d/gdm etc-sys-etc
  111 +./etc/pam.d/imap etc-sys-etc
  112 +./etc/pam.d/kde etc-sys-etc
  113 +./etc/pam.d/login etc-sys-etc
  114 +./etc/pam.d/other etc-sys-etc
  115 +./etc/pam.d/passwd etc-sys-etc
  116 +./etc/pam.d/pop3 etc-sys-etc
  117 +./etc/pam.d/ppp etc-sys-etc
  118 +./etc/pam.d/rexecd etc-sys-etc
  119 +./etc/pam.d/rsh etc-sys-etc
  120 +./etc/pam.d/sshd etc-sys-etc
  121 +./etc/pam.d/su etc-sys-etc
  122 +./etc/pam.d/system etc-sys-etc
  123 +./etc/pam.d/telnetd etc-sys-etc
  124 +./etc/pam.d/xdm etc-sys-etc
  125 +./etc/pam.d/xserver etc-sys-etc
  126 +./etc/passwd etc-sys-etc
  127 +./etc/passwd.conf etc-sys-etc
  128 +./etc/pf.conf etc-pf-etc pf
  129 +./etc/pf.os etc-pf-etc pf
  130 +./etc/phones etc-sys-etc
  131 +./etc/postfix/README etc-postfix-etc postfix
  132 +./etc/postfix/main.cf etc-postfix-etc postfix
  133 +./etc/postfix/master.cf etc-postfix-etc postfix
  134 +./etc/postfix/post-install etc-postfix-etc postfix
  135 +./etc/postfix/postfix-files etc-postfix-etc postfix
  136 +./etc/postfix/postfix-script etc-postfix-etc postfix
  137 +./etc/postinstall etc-obsolete obsolete
  138 +./etc/powerd/scripts/acadapter etc-sysutil-etc
  139 +./etc/powerd/scripts/hotkey_button etc-sysutil-etc
  140 +./etc/powerd/scripts/lid_switch etc-sysutil-etc
  141 +./etc/powerd/scripts/power_button etc-sysutil-etc
  142 +./etc/powerd/scripts/reset_button etc-sysutil-etc
  143 +./etc/powerd/scripts/sensor_battery etc-sysutil-etc
  144 +./etc/powerd/scripts/sensor_drive etc-sysutil-etc
  145 +./etc/powerd/scripts/sensor_fan etc-sysutil-etc
  146 +./etc/powerd/scripts/sensor_indicator etc-sysutil-etc
  147 +./etc/powerd/scripts/sensor_power etc-sysutil-etc
  148 +./etc/powerd/scripts/sensor_resistance etc-sysutil-etc
  149 +./etc/powerd/scripts/sensor_temperature etc-sysutil-etc
  150 +./etc/powerd/scripts/sensor_voltage etc-sysutil-etc
  151 +./etc/powerd/scripts/sleep_button etc-sysutil-etc
  152 +./etc/primes etc-obsolete obsolete
  153 +./etc/printcap etc-lpr-etc
  154 +./etc/profile etc-util-etc
  155 +./etc/protocols etc-net-etc
  156 +./etc/pwd.db etc-sys-etc
  157 +./etc/rbootd.conf etc-bootserver-etc
  158 +./etc/rc etc-sys-rc
  159 +./etc/rc.conf etc-sys-rc
  160 +./etc/rc.d/DAEMON etc-sys-rc
  161 +./etc/rc.d/LOGIN etc-sys-rc
  162 +./etc/rc.d/NETWORK etc-obsolete obsolete
  163 +./etc/rc.d/NETWORKING etc-sys-rc
  164 +./etc/rc.d/SERVERS etc-sys-rc
  165 +./etc/rc.d/accounting etc-sys-rc
  166 +./etc/rc.d/altqd etc-router-rc
  167 +./etc/rc.d/amd etc-amd-rc
  168 +./etc/rc.d/apmd etc-sys-rc
  169 +./etc/rc.d/bootconf.sh etc-sys-rc
  170 +./etc/rc.d/bootparams etc-bootserver-rc
  171 +./etc/rc.d/btconfig etc-sys-rc
  172 +./etc/rc.d/btcontrol etc-obsolete obsolete
  173 +./etc/rc.d/btdevctl etc-sys-rc
  174 +./etc/rc.d/bthcid etc-sys-rc
  175 +./etc/rc.d/btuartd etc-sys-rc
  176 +./etc/rc.d/ccd etc-sys-rc
  177 +./etc/rc.d/cgd etc-sys-rc
  178 +./etc/rc.d/cleartmp etc-sys-rc
  179 +./etc/rc.d/cron etc-cron-rc
  180 +./etc/rc.d/devfsd etc-sys-rc
  181 +./etc/rc.d/dhclient etc-dhclient-rc
  182 +./etc/rc.d/dhcpd etc-dhcpd-rc
  183 +./etc/rc.d/dhcrelay etc-dhcpd-rc
  184 +./etc/rc.d/dmesg etc-sys-rc
  185 +./etc/rc.d/downinterfaces etc-sys-rc
  186 +./etc/rc.d/envsys etc-sys-rc
  187 +./etc/rc.d/fixsb etc-obsolete obsolete
  188 +./etc/rc.d/fsck etc-sys-rc
  189 +./etc/rc.d/fsck.sh etc-obsolete obsolete
  190 +./etc/rc.d/ftpd etc-net-rc
  191 +./etc/rc.d/hostapd etc-net-rc
  192 +./etc/rc.d/gated etc-obsolete obsolete
  193 +./etc/rc.d/identd etc-net-rc
  194 +./etc/rc.d/ifwatchd etc-net-rc
  195 +./etc/rc.d/inetd etc-net-rc
  196 +./etc/rc.d/ipfilter etc-ipf-rc
  197 +./etc/rc.d/ipfs etc-ipf-rc
  198 +./etc/rc.d/ipmon etc-ipf-rc
  199 +./etc/rc.d/ipnat etc-ipf-rc
  200 +./etc/rc.d/ipsec etc-net-rc
  201 +./etc/rc.d/irdaattach etc-sys-rc
  202 +./etc/rc.d/iscsi_target etc-iscsi-rc
  203 +./etc/rc.d/isdnd etc-isdn-rc
  204 +./etc/rc.d/kdc etc-krb5-rc
  205 +./etc/rc.d/kerberos etc-obsolete obsolete
  206 +./etc/rc.d/ldconfig etc-sys-rc
  207 +./etc/rc.d/lkm1 etc-sys-rc
  208 +./etc/rc.d/lkm2 etc-sys-rc
  209 +./etc/rc.d/lkm3 etc-sys-rc
  210 +./etc/rc.d/local etc-sys-rc
  211 +./etc/rc.d/lpd etc-lpr-rc
  212 +./etc/rc.d/mixerctl etc-audio-rc
  213 +./etc/rc.d/mopd etc-bootserver-rc
  214 +./etc/rc.d/motd etc-sys-rc
  215 +./etc/rc.d/mountall etc-sys-rc
  216 +./etc/rc.d/mountcritlocal etc-sys-rc
  217 +./etc/rc.d/mountcritremote etc-sys-rc
  218 +./etc/rc.d/mountd etc-nfsserver-rc
  219 +./etc/rc.d/moused etc-sysutil-rc
  220 +./etc/rc.d/mrouted etc-router-rc
  221 +./etc/rc.d/named etc-bind-rc
  222 +./etc/rc.d/ndbootd etc-bootserver-rc
  223 +./etc/rc.d/network etc-net-rc
  224 +./etc/rc.d/newsyslog etc-sys-rc
  225 +./etc/rc.d/nfsd etc-nfsserver-rc
  226 +./etc/rc.d/nfslocking etc-nfsserver-rc
  227 +./etc/rc.d/ntpd etc-ntp-rc
  228 +./etc/rc.d/ntpdate etc-ntp-rc
  229 +./etc/rc.d/perusertmp etc-sys-rc
  230 +./etc/rc.d/pf etc-net-rc
  231 +./etc/rc.d/pf_boot etc-net-rc
  232 +./etc/rc.d/pflogd etc-net-rc
  233 +./etc/rc.d/poffd etc-sys-rc
  234 +./etc/rc.d/postfix etc-postfix-rc
  235 +./etc/rc.d/powerd etc-sysutil-rc
  236 +./etc/rc.d/ppp etc-ppp-rc
  237 +./etc/rc.d/pwcheck etc-sys-rc
  238 +./etc/rc.d/quota etc-sys-rc
  239 +./etc/rc.d/racoon etc-net-rc
  240 +./etc/rc.d/raidframe etc-sys-rc
  241 +./etc/rc.d/raidframeparity etc-sys-rc
  242 +./etc/rc.d/rarpd etc-bootserver-rc
  243 +./etc/rc.d/rbootd etc-bootserver-rc
  244 +./etc/rc.d/root etc-sys-rc
  245 +./etc/rc.d/route6d etc-router-rc
  246 +./etc/rc.d/routed etc-router-rc
  247 +./etc/rc.d/rpcbind etc-rpcbind-rc
  248 +./etc/rc.d/rtadvd etc-net-rc
  249 +./etc/rc.d/rtclocaltime etc-sys-rc
  250 +./etc/rc.d/rtsold etc-net-rc
  251 +./etc/rc.d/rwho etc-net-rc
  252 +./etc/rc.d/savecore etc-sys-rc
  253 +./etc/rc.d/screenblank etc-sys-rc
  254 +./etc/rc.d/sdpd etc-sys-rc
  255 +./etc/rc.d/securelevel etc-sys-rc
  256 +./etc/rc.d/sshd etc-secsh-rc
  257 +./etc/rc.d/staticroute etc-sys-rc
  258 +./etc/rc.d/swap1 etc-sys-rc
  259 +./etc/rc.d/swap2 etc-sys-rc
  260 +./etc/rc.d/sysctl etc-sys-rc
  261 +./etc/rc.d/sysdb etc-sys-rc
  262 +./etc/rc.d/syslogd etc-sys-rc
  263 +./etc/rc.d/systemfs etc-obsolete obsolete
  264 +./etc/rc.d/timed etc-timed-rc
  265 +./etc/rc.d/tpctl etc-sys-rc
  266 +./etc/rc.d/ttys etc-sys-rc
  267 +./etc/rc.d/veriexec etc-sys-rc
  268 +./etc/rc.d/virecover etc-sys-rc
  269 +./etc/rc.d/wdogctl etc-sysutil-rc
  270 +./etc/rc.d/wpa_supplicant etc-net-rc
  271 +./etc/rc.d/wscons etc-sys-rc
  272 +./etc/rc.d/wsmoused etc-sys-rc
  273 +./etc/rc.d/xdm etc-x11-rc
  274 +./etc/rc.d/xfs etc-x11-rc
  275 +./etc/rc.d/xntpd etc-obsolete obsolete
  276 +./etc/rc.d/ypbind etc-nis-rc
  277 +./etc/rc.d/yppasswdd etc-nis-rc
  278 +./etc/rc.d/ypserv etc-nis-rc
  279 +./etc/rc.d/ypset etc-obsolete obsolete
  280 +./etc/rc.lkm etc-sys-rc
  281 +./etc/rc.local etc-sys-rc
  282 +./etc/rc.shutdown etc-sys-rc
  283 +./etc/rc.subr etc-sys-rc
  284 +./etc/rc.wscons etc-obsolete obsolete
  285 +./etc/release-info etc-obsolete obsolete
  286 +./etc/remote etc-sys-etc
  287 +./etc/rmt etc-sysutil-etc
  288 +./etc/rpc etc-net-etc
  289 +./etc/security etc-sys-etc
  290 +./etc/security.conf etc-sys-etc
  291 +./etc/services etc-net-etc
  292 +./etc/shells etc-sys-etc
  293 +./etc/shrc etc-util-etc
  294 +./etc/skel/.cshrc etc-sys-etc
  295 +./etc/skel/.login etc-sys-etc
  296 +./etc/skel/.logout etc-sys-etc
  297 +./etc/skel/.profile etc-sys-etc
  298 +./etc/skel/.shrc etc-sys-etc
  299 +./etc/skeykeys etc-sys-etc
  300 +./etc/spamd.conf etc-obsolete obsolete
  301 +./etc/spwd.db etc-sys-etc
  302 +./etc/ssh/ssh_config etc-secsh-etc crypto
  303 +./etc/ssh/ssh_known_hosts etc-secsh-etc crypto
  304 +./etc/ssh/sshd_config etc-secsh-etc crypto
  305 +./etc/sysctl.conf etc-sys-etc
  306 +./etc/syslog.conf etc-sys-etc
  307 +./etc/ttys etc-sys-etc
  308 +./etc/weekly etc-sys-etc
  309 +./etc/weekly.conf etc-sys-etc
  310 +./etc/wscons.conf etc-sys-etc
  311 +./root/.cshrc etc-root-root
  312 +./root/.klogin etc-root-root
  313 +./root/.login etc-root-root
  314 +./root/.profile etc-root-root
  315 +./root/.shrc etc-root-root
  316 +./var/at/at.deny etc-cron-root
  317 +./var/crash/minfree etc-sys-root
  318 +./var/cron/tabs/root etc-cron-root
  319 +./var/db/locate.database etc-sys-root
  320 +./var/games/atc_score etc-games-scores
  321 +./var/games/battlestar.log etc-games-scores
  322 +./var/games/cfscores etc-games-scores
  323 +./var/games/criblog etc-games-scores
  324 +./var/games/hackdir/record etc-games-scores
  325 +./var/games/larn/llog12.0 etc-games-scores
  326 +./var/games/larn/lscore12.0 etc-games-scores
  327 +./var/games/larn/playerids etc-games-scores
  328 +./var/games/phantasia/characs etc-games-scores
  329 +./var/games/phantasia/scoreboard etc-games-scores
  330 +./var/games/robots_roll etc-games-scores
  331 +./var/games/rogue.scores etc-games-scores
  332 +./var/games/saillog etc-games-scores
  333 +./var/games/snake.log etc-games-scores
  334 +./var/games/snakerawscores etc-games-scores
  335 +./var/games/tetris.scores etc-games-scores
  336 +./var/log/authlog etc-sys-log
  337 +./var/log/cron etc-cron-log
  338 +./var/log/lastlog etc-sys-log
  339 +./var/log/lastlogx etc-sys-log
  340 +./var/log/lpd-errs etc-lpr-log
  341 +./var/log/maillog etc-sendmail-log
  342 +./var/log/messages etc-sys-log
  343 +./var/log/secure etc-sys-log
  344 +./var/log/wtmp etc-sys-log
  345 +./var/log/wtmpx etc-sys-log
  346 +./var/log/xferlog etc-netutil-log
  347 +./var/msgs/bounds etc-sysutil-log
  348 +./var/run/utmp etc-sys-log
  349 +./var/run/utmpx etc-sys-log
  350 +./var/yp/Makefile.main etc-nis-root yp
  351 +./var/yp/Makefile.yp etc-nis-root yp
5,097 distrib/sets/lists/man/mi
5,097 additions, 0 deletions not shown
627 etc/Makefile
... ... @@ -0,0 +1,627 @@
  1 +# $NetBSD: Makefile,v 1.348.4.2 2008/02/18 22:07:01 mjf Exp $
  2 +# from: @(#)Makefile 8.7 (Berkeley) 5/25/95
  3 +
  4 +# Environment variables without default values:
  5 +# DESTDIR must be set before anything in this file will work.
  6 +# RELEASEDIR is where the tarred up stuff for a snapshot or
  7 +# release will be placed.
  8 +#
  9 +# Environment variables with default values:
  10 +# LOCALTIME will set the default local time for the system you
  11 +# build; it determines what /etc/localtime is symlink'd to.
  12 +# KERNSRCDIR points to kernel source; it is set by default to ../sys,
  13 +# but can be overridden.
  14 +# KERNOBJDIR is the kernel build directory, it defaults to
  15 +# ${KERNSRCDIR}/arch/${MACHINE}/compile, but can be overridden.
  16 +# KERNCONFDIR is where the configuration files for kernels are found;
  17 +# default is ${KERNSRCDIR}/arch/${MACHINE}/conf but can be overridden.
  18 +# MKCRYPTO; if not `no', install crypto-related configuration
  19 +# MKPOSTFIX; if not `no', install postfix configuration
  20 +# MKUNPRIVED; if not `no', allow non-root installs.
  21 +# MKUPDATE; if not `no', don't do a 'make clean' before kernel compile
  22 +#
  23 +# Targets:
  24 +# distribution: makes a full NetBSD distribution in DESTDIR. If
  25 +# INSTALL_DONE is set, it will not do a `make install.'
  26 +# if DISTRIBUTION_DONE is set, it will not do anything.
  27 +# distrib-dirs: creates an empty NetBSD directory tree in DESTDIR.
  28 +# Called by distribution.
  29 +# snapshot: calls distribution, above, and then tars up the files
  30 +# into a release(7) format in RELEASEDIR/${RELEASEMACHINEDIR}.
  31 +# Any port-dependent stuff for this target is found in
  32 +# etc.${MACHINE}/Makefile.inc.
  33 +# release: a synonym for `snapshot'
  34 +#
  35 +
  36 +# For MK* vars
  37 +.include <bsd.own.mk>
  38 +
  39 +.include <bsd.sys.mk> # for HOST_SH
  40 +.include <bsd.kernobj.mk> # For KERNSRCDIR, KERNOBJDIR, ...
  41 +.include <bsd.endian.mk> # For TARGET_ENDIANNESS
  42 +
  43 +.MAKEOVERRIDES+= USETOOLS
  44 +
  45 +TZDIR= /usr/share/zoneinfo
  46 +LOCALTIME?= UTC
  47 +CKSUM?= ${TOOL_CKSUM}
  48 +MAKESUMS= MAKE=${MAKE:Q} CKSUM=${CKSUM:Q} ${HOST_SH} ${NETBSDSRCDIR}/distrib/sets/makesums
  49 +DISTRIBVER!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
  50 +
  51 +# Flags for creating ISO CDROM image
  52 +# mkisofs is expected to be in $PATH, install via pkgsrc/sysutils/cdrtools
  53 +# Note: At least mkisofs 2.0 should be used.
  54 +#
  55 +.if !defined(MKISOFS)
  56 +MKISOFS!= (which mkisofs || echo true)
  57 +.endif
  58 +DISTRIBREV!= ${HOST_SH} ${KERNSRCDIR}/conf/osrelease.sh -s
  59 +# ISO 9660 volume ID. Note that this can only contain [A-Z0-9_].
  60 +ISO_VOLID!= echo NETBSD_${DISTRIBREV} | tr a-z A-Z
  61 +MKISOFS_FLAGS+= -J -l -hide-joliet-trans-tbl -r -T \
  62 + -V ${ISO_VOLID} \
  63 + -publisher "The NetBSD Project" \
  64 + -m "${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom"
  65 +.if ${MKISOFS_FLAGS:N-v}
  66 +MKISOFS_FLAGS+= -quiet
  67 +.endif
  68 +
  69 +
  70 +# MD Makefile.inc may append MD targets to BIN[123]. Make sure all
  71 +# are empty, to preserve the old semantics of setting them below with "+=".
  72 +#
  73 +BIN1=
  74 +BIN2=
  75 +BIN3=
  76 +
  77 +# Directories to build in ${RELEASEDIR}/${RELEASEMACHINEDIR}.
  78 +# MD Makefile.inc files can add to this.
  79 +# NOTE: Parent directories must be listed before subdirectories.
  80 +#
  81 +INSTALLATION_DIRS= binary binary/sets binary/kernel installation
  82 +
  83 +.if exists(etc.${RELEASEMACHINE}/Makefile.inc)
  84 +.include "etc.${RELEASEMACHINE}/Makefile.inc"
  85 +.endif
  86 +
  87 +# -rw-r--r--
  88 +BINOWN= root
  89 +BINGRP= wheel
  90 +UTMPGRP= utmp
  91 +BIN1+= audit-packages.conf bootptab changelist csh.cshrc csh.login \
  92 + csh.logout daily daily.conf devfsd.conf dm.conf envsys.conf \
  93 + floppytab ftpchroot \
  94 + ftpusers gettytab group hosts hosts.lpd inetd.conf lkm.conf \
  95 + locate.conf login.conf mailer.conf man.conf monthly monthly.conf \
  96 + mrouted.conf named.conf netconfig networks newsyslog.conf \
  97 + nsswitch.conf ntp.conf passwd.conf phones printcap profile protocols \
  98 + rbootd.conf rc rc.conf rc.lkm rc.local rc.subr rc.shutdown remote rpc \
  99 + security security.conf services shells shrc sysctl.conf syslog.conf \
  100 + weekly weekly.conf wscons.conf
  101 +
  102 +# Use machine-specific disktab if it exists, or the MI one otherwise
  103 +.if exists(etc.${MACHINE}/disktab)
  104 +BIN1+= etc.${MACHINE}/disktab
  105 +.else
  106 +BIN1+= disktab
  107 +.endif
  108 +
  109 +.if exists(etc.${MACHINE}/ld.so.conf)
  110 +BIN1+= etc.${MACHINE}/ld.so.conf
  111 +.endif
  112 +
  113 +.if exists(etc.${MACHINE}/ttyaction)
  114 +BIN1+= etc.${MACHINE}/ttyaction
  115 +.endif
  116 +
  117 +# -rw-rw-r--
  118 +.if !empty(DISTRIBVER:M*.99.*)
  119 +BIN2+= motd.current
  120 +FILESNAME_motd.current= motd
  121 +.elif !empty(DISTRIBVER:M*BETA*)
  122 +BIN2+= motd.beta
  123 +FILESNAME_motd.beta= motd
  124 +.elif !empty(DISTRIBVER:M*RC*)
  125 +BIN2+= motd.rc
  126 +FILESNAME_motd.rc= motd
  127 +.elif !empty(DISTRIBVER:M*STABLE*)
  128 +BIN2+= motd.stable
  129 +FILESNAME_motd.stable= motd
  130 +.else
  131 +BIN2+= motd
  132 +.endif
  133 +
  134 +# -rw-------
  135 +BIN3+= hosts.equiv
  136 +
  137 +SYSPKG= etc
  138 +ETC_PKG=-T etc_pkg
  139 +BASE_PKG=-T base_pkg
  140 +ETC_INSTALL_FILE=cd ${.CURDIR} && ${INSTALL_FILE} ${ETC_PKG}
  141 +ETC_INSTALL_OBJ_FILE=cd ${.OBJDIR} && ${INSTALL_FILE} ${ETC_PKG}
  142 +
  143 +.if ${TARGET_ENDIANNESS} == "1234"
  144 +PWD_MKDB_ENDIAN= -L
  145 +.elif ${TARGET_ENDIANNESS} == "4321"
  146 +PWD_MKDB_ENDIAN= -B
  147 +.else
  148 +PWD_MKDB_ENDIAN=
  149 +.endif
  150 +
  151 +
  152 +# distribution --
  153 +# Build a distribution
  154 +#
  155 +distribution: .PHONY .MAKE check_DESTDIR distrib-dirs
  156 +.if !defined(DISTRIBUTION_DONE)
  157 +.if !defined(INSTALL_DONE)
  158 + ${MAKEDIRTARGET} ${NETBSDSRCDIR} include _DISTRIB=
  159 + ${MAKEDIRTARGET} ${NETBSDSRCDIR} install _DISTRIB=
  160 +.endif # !INSTALL_DONE
  161 + ${MAKEDIRTARGET} . install-etc-files
  162 +.if ${MKX11} != "no"
  163 + ${MAKEDIRTARGET} ${NETBSDSRCDIR}/x11 distribution
  164 +.endif
  165 + ${MAKEDIRTARGET} ${NETBSDSRCDIR}/distrib/sets makesetfiles
  166 +.endif # !DISTRIBUTION_DONE
  167 +
  168 +
  169 +CLEANFILES+= MAKEDEV
  170 +MAKEDEV: .EXEC
  171 + ${_MKTARGET_CREATE}
  172 + MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
  173 + NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
  174 + awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl > ${.TARGET}
  175 +
  176 +RELEASEVARS= BSDOBJDIR BSDSRCDIR BUILDID \
  177 + DESTDIR EXTERNAL_TOOLCHAIN HAVE_GCC HAVE_GDB \
  178 + INSTALLWORLDDIR \
  179 + KERNARCHDIR KERNCONFDIR KERNOBJDIR KERNSRCDIR \
  180 + MACHINE MACHINE_ARCH MAKE MAKECONF MAKEFLAGS \
  181 + MAKEOBJDIR MAKEOBJDIRPREFIX MAKEVERBOSE \
  182 + MKBFD MKCATPAGES \
  183 + MKCRYPTO MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKCVS \
  184 + MKDEBUG MKDEBUGLIB MKDOC MKDYNAMICROOT \
  185 + MKGCC MKGCCCMDS MKGDB \
  186 + MKHESIOD MKHOSTOBJ MKHTML MKIEEEFP MKINET6 MKINFO MKIPFILTER \
  187 + MKKERBEROS MKLINKLIB MKLINT \
  188 + MKMAN MKMANZ MKNLS MKOBJ MKOBJDIRS \
  189 + MKPAM MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
  190 + MKSHARE MKSKEY MKSOFTFLOAT MKSTATICLIB \
  191 + MKUNPRIVED MKUPDATE MKX11 MKYP \
  192 + NBUILDJOBS NETBSDSRCDIR \
  193 + NOCLEANDIR NODISTRIBDIRS NOINCLUDES \
  194 + OBJMACHINE \
  195 + RELEASEDIR TOOLCHAIN_MISSING TOOLDIR \
  196 + USETOOLS USR_OBJMACHINE \
  197 + X11SRCDIR
  198 +
  199 +params: .PHONY
  200 +.for var in ${RELEASEVARS}
  201 +.if defined(${var})
  202 + @printf "%20s = '%-s'\n" ${var} ${${var}:Q}
  203 +.else
  204 + @printf "%20s = (undefined)\n" ${var}
  205 +.endif
  206 +.endfor
  207 +
  208 +CLEANFILES+= etc-release
  209 +etc-release: .EXEC .MAKE
  210 + ${_MKTARGET_CREATE}
  211 + @( echo "NetBSD ${DISTRIBVER}/${MACHINE}"; \
  212 + echo ; \
  213 + cat ${NETBSDSRCDIR}/sys/conf/copyright; \
  214 + echo ; \
  215 + echo "Build settings:"; \
  216 + printf "%20s %s\n" "Build date" "$$(date -u)"; \
  217 + printf "%20s %s\n" "Built by" "$${USER-root}@$$(hostname)"; \
  218 + echo ; \
  219 + (cd ${.CURDIR}; ${MAKE} ${MFLAGS} -j1 params); \
  220 + ) >${.OBJDIR}/${.TARGET}
  221 +
  222 +install-etc-release: .PHONY etc-release
  223 + ${_MKMSG_INSTALL} etc/release
  224 + ${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 444 \
  225 + etc-release ${DESTDIR}/etc/release
  226 +
  227 +
  228 +FILESDIR= /etc
  229 +CONFIGFILES=
  230 +CONFIGSYMLINKS=
  231 +
  232 +.for file in ${BIN1}
  233 +CONFIGFILES+= ${file}
  234 +FILESMODE_${file:T}= 644
  235 +.endfor
  236 +
  237 +.for file in ${BIN2}
  238 +CONFIGFILES+= ${file}
  239 +FILESMODE_${file:T}= 664
  240 +.endfor
  241 +
  242 +.for file in ${BIN3}
  243 +CONFIGFILES+= ${file}
  244 +FILESMODE_${file:T}= 600
  245 +.endfor
  246 +
  247 +.if (${MKPOSTFIX} != "no")
  248 +CONFIGFILES+= aliases
  249 +FILESDIR_aliases= /etc/mail
  250 +FILESMODE_aliases= 644
  251 +.endif
  252 +
  253 +CONFIGFILES+= MAKEDEV.local
  254 +FILESDIR_MAKEDEV.local= /dev
  255 +FILESMODE_MAKEDEV.local=${BINMODE}
  256 +
  257 +CONFIGFILES+= crontab
  258 +FILESDIR_crontab= /var/cron/tabs
  259 +FILESNAME_crontab= root
  260 +FILESMODE_crontab= 600
  261 +
  262 +CONFIGFILES+= minfree
  263 +FILESDIR_minfree= /var/crash
  264 +FILESMODE_minfree= 600
  265 +
  266 +CONFIGSYMLINKS+= ${TZDIR}/${LOCALTIME} /etc/localtime \
  267 + /usr/sbin/rmt /etc/rmt
  268 +
  269 +
  270 +# install-etc-files --
  271 +# Install etc (config) files; not performed by "make build"
  272 +#
  273 +install-etc-files: .PHONY .MAKE check_DESTDIR MAKEDEV
  274 + ${_MKMSG_INSTALL} ${DESTDIR}/etc/master.passwd
  275 + ${ETC_INSTALL_FILE} -o root -g wheel -m 600 \
  276 + master.passwd ${DESTDIR}/etc
  277 + ${TOOL_PWD_MKDB} -p ${PWD_MKDB_ENDIAN} -d ${DESTDIR}/ \
  278 + ${DESTDIR}/etc/master.passwd
  279 +.if ${MKUNPRIVED} != "no"
  280 + ( \
  281 + for metaent in passwd pwd.db spwd.db; do \
  282 + echo "./etc/$${metaent} type=file mode=0644 uname=root gname=wheel tags=etc_pkg"; \
  283 + done; \
  284 + ) | ${METALOG.add}
  285 +.endif # MKUNPRIVED != no
  286 + ${_MKMSG_INSTALL} ${DESTDIR}/etc/ttys
  287 + ${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
  288 + ${.CURDIR}/etc.${MACHINE}/ttys ${DESTDIR}/etc
  289 + ${_MKMSG_INSTALL} ${DESTDIR}/dev/MAKEDEV
  290 + ${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 555 \
  291 + MAKEDEV ${DESTDIR}/dev
  292 +.for owner group mode file in \
  293 + ${BINOWN} operator 664 /etc/dumpdates \
  294 + ${BINOWN} operator 600 /etc/skeykeys \
  295 + root wheel 600 /var/at/at.deny \
  296 + nobody ${BINGRP} 664 /var/db/locate.database \
  297 + ${BINOWN} ${BINGRP} 600 /var/log/authlog \
  298 + root wheel 600 /var/log/cron \
  299 + ${BINOWN} ${UTMPGRP} 664 /var/log/lastlog \
  300 + ${BINOWN} ${UTMPGRP} 664 /var/log/lastlogx \
  301 + ${BINOWN} ${BINGRP} 640 /var/log/lpd-errs \
  302 + ${BINOWN} ${BINGRP} 600 /var/log/maillog \
  303 + ${BINOWN} ${BINGRP} 644 /var/log/messages \
  304 + ${BINOWN} ${BINGRP} 600 /var/log/secure \
  305 + ${BINOWN} ${UTMPGRP} 664 /var/log/wtmp \
  306 + ${BINOWN} ${UTMPGRP} 664 /var/log/wtmpx \
  307 + ${BINOWN} ${BINGRP} 600 /var/log/xferlog \
  308 + daemon staff 664 /var/msgs/bounds \
  309 + ${BINOWN} ${UTMPGRP} 664 /var/run/utmp \
  310 + ${BINOWN} ${UTMPGRP} 664 /var/run/utmpx \
  311 + games games 664 /var/games/atc_score \
  312 + games games 664 /var/games/battlestar.log \
  313 + games games 664 /var/games/cfscores \
  314 + games games 664 /var/games/criblog \
  315 + games games 660 /var/games/hackdir/perm \
  316 + games games 660 /var/games/hackdir/record \
  317 + games games 664 /var/games/larn/llog12.0 \
  318 + games games 664 /var/games/larn/lscore12.0 \
  319 + games games 664 /var/games/larn/playerids \
  320 + games games 664 /var/games/robots_roll \
  321 + games games 664 /var/games/rogue.scores \
  322 + games games 664 /var/games/saillog \
  323 + games games 664 /var/games/snakerawscores \
  324 + games games 664 /var/games/snake.log \
  325 + games games 664 /var/games/tetris.scores
  326 + ${_MKMSG_INSTALL} ${DESTDIR}${file}
  327 + ${ETC_INSTALL_FILE} -o ${owner} -g ${group} -m ${mode} \
  328 + /dev/null ${DESTDIR}${file}
  329 +.endfor
  330 +.for subdir in . atf defaults bluetooth iscsi mtree namedb pam.d powerd rc.d root skel ssh
  331 + ${MAKEDIRTARGET} ${subdir} configinstall
  332 +.endfor
  333 + ${MAKEDIRTARGET} ${NETBSDSRCDIR}/usr.bin/mail configinstall
  334 +.if (${MKPF} != "no")
  335 + ${MAKEDIRTARGET} ${NETBSDSRCDIR}/usr.sbin/pf configinstall
  336 +.endif
  337 +.if (${MKCRYPTO} != "no")
  338 + ${MAKEDIRTARGET} ${NETBSDSRCDIR}/usr.bin/ssh configinstall
  339 +.endif
  340 +.if (${MKPOSTFIX} != "no")
  341 + ${MAKEDIRTARGET} ${NETBSDSRCDIR}/gnu/usr.sbin/postfix configinstall
  342 +.endif
  343 +
  344 +
  345 +# install-obsolete-lists --
  346 +# Install var/db/obsolete set lists; this is performed by "make build"
  347 +#
  348 +OBSOLETE.dir= ${.OBJDIR}/obsolete.dir
  349 +OBSOLETE.files= base comp etc games man misc tests text
  350 +.if ${MKX11} != "no"
  351 +OBSOLETE.files+= xbase xcomp xetc xfont xserver
  352 +.endif
  353 +
  354 +install-obsolete-lists: .PHONY .MAKE
  355 + mkdir -p ${OBSOLETE.dir}
  356 +.if ${MKX11} != "no"
  357 + (cd ${NETBSDSRCDIR}/distrib/sets && \
  358 + MAKE=${MAKE:Q} ${HOST_SH} ./makeobsolete -b -t ${OBSOLETE.dir})
  359 +.else
  360 + (cd ${NETBSDSRCDIR}/distrib/sets && \
  361 + MAKE=${MAKE:Q} ${HOST_SH} ./makeobsolete -t ${OBSOLETE.dir})
  362 +.endif
  363 +.for file in ${OBSOLETE.files}
  364 + ${_MKMSG_INSTALL} ${DESTDIR}/var/db/obsolete/${file}
  365 + ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
  366 + ${OBSOLETE.dir}/${file} ${DESTDIR}/var/db/obsolete
  367 +.endfor
  368 +
  369 +
  370 +# distrib-dirs --
  371 +# Populate $DESTDIR with directories needed by NetBSD
  372 +#
  373 +.if ${MKUNPRIVED} == "no"
  374 +TOOL_MTREE.unpriv=
  375 +.else
  376 +TOOL_MTREE.unpriv= -W
  377 +.endif
  378 +
  379 +distrib-dirs: .PHONY check_DESTDIR
  380 +.if !defined(DISTRIBUTION_DONE) # {
  381 +# XXX: If METALOG=${DESTDIR}/METALOG (as is normal), and if ${DESTDIR}
  382 +# does not yet exist (as often happens), then the INSTALL_DIR command
  383 +# immediately below will create ${DESTDIR} but will fail to register
  384 +# an entry for "." in the metalog. We ignore the problem, because the
  385 +# TOOL_MTREE commands a little further below will soon register an entry
  386 +# for "." in the metalog.
  387 + ${INSTALL_DIR} -o root -g wheel -m 755 ${BASE_PKG} ${DESTDIR}
  388 +# XXX: It would be nice if a single mtree invocation could both
  389 +# append to the metalog and do real work. Instead, we have to
  390 +# repeat the command twice in slightly different ways.
  391 + ${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist -N ${.CURDIR} \
  392 + -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv}
  393 +.if ${MKUNPRIVED} != "no" # {
  394 + ${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist -N ${.CURDIR} \
  395 + -p ${DESTDIR}/ -C -k all | \
  396 + awk '/ optional/ {next} // {print}' | ${METALOG.add}
  397 +.endif # MKUNPRIVED # }
  398 +.endif # DISTRIBUTION_DONE # }
  399 +
  400 +# release, snapshot --
  401 +# Build a full distribution including kernels & install media.
  402 +#
  403 +release snapshot: .PHONY .MAKE check_DESTDIR check_RELEASEDIR snap_md_post
  404 + ${MAKEDIRTARGET} ${NETBSDSRCDIR}/distrib/sets sets
  405 + ${MAKESUMS} -A -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets \
  406 + ${KERNEL_SETS:@.SETS.@kern-${.SETS.}.tgz@}
  407 + ${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel '*.gz'
  408 +
  409 +
  410 +# iso-image --
  411 +# Standalone target to create a CDROM image after the release
  412 +# was composed. Should be run after "make release" in src and xsrc.
  413 +# The do-iso-image is to be called from etc.$MACHINE/Makefile.inc
  414 +#
  415 +# Note: At least mkisofs 2.0 should be used.
  416 +#
  417 +CDROM_NAME_ADD?=
  418 +CDROM.image?=${RELEASEDIR}/iso/${MACHINE}cd.iso
  419 +CDROM.dir= ${.OBJDIR}/cdrom.dir
  420 +CDROM.pathlist= ${.OBJDIR}/cdrom.pathlist
  421 +
  422 +iso-image:
  423 +
  424 +.if ${MKISOFS} != true
  425 +do-iso-image: .PHONY check_DESTDIR check_RELEASEDIR iso-image-md-post
  426 + ${MAKESUMS} -t ${RELEASEDIR}/iso/ '*.iso'
  427 + @echo "iso-image created as: ${CDROM.image}"
  428 +.else
  429 +do-iso-image:
  430 + @echo iso-image: mkisofs not found
  431 +.endif
  432 +
  433 +iso-image-setup: .PHONY check_RELEASEDIR
  434 + rm -f ${CDROM.pathlist}
  435 +.for extra in README SOURCE_DATE source
  436 +.if exists(${RELEASEDIR}/${extra})
  437 + echo "${extra}=${RELEASEDIR}/${extra}" >> ${CDROM.pathlist}
  438 +.endif
  439 +.endfor
  440 + echo "${MACHINE}/=${RELEASEDIR}/${RELEASEMACHINEDIR}/" >> ${CDROM.pathlist}
  441 + mkdir -p ${CDROM.dir}
  442 + mkdir -p ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom
  443 +
  444 +# iso-image-mi --
  445 +# Create the image after the MD operations have completed.
  446 +#
  447 +iso-image-mi: .PHONY check_DESTDIR check_RELEASEDIR iso-image-md-pre
  448 + @if ! ${MKISOFS} --version; then \
  449 + echo "install pkgsrc/sysutils/cdrtools and run 'make iso-image'." ; \
  450 + false; \
  451 + fi
  452 + ${MKISOFS} ${MKISOFS_FLAGS} -graft-points -path-list ${CDROM.pathlist} \
  453 + -o ${CDROM.image} ${CDROM.dir}
  454 +
  455 +# iso-image-md-pre --
  456 +# Setup ${CDROM.dir} to produce a bootable CD image.
  457 +# Overridden by etc.$MACHINE/Makefile.inc
  458 +#
  459 +iso-image-md-pre: .PHONY check_DESTDIR check_RELEASEDIR iso-image-setup
  460 +# (empty -- look in the machine-dependent Makefile.inc)
  461 +
  462 +# iso-image-md-post --
  463 +# Fixup the CD-image to be bootable.
  464 +# Overridden by etc.$MACHINE/Makefile.inc
  465 +#
  466 +iso-image-md-post: .PHONY check_DESTDIR check_RELEASEDIR iso-image-mi
  467 +# (empty -- look in the machine-dependent Makefile.inc)
  468 +
  469 +
  470 +# snap_pre --
  471 +# Create ${RELEASEDIR} and necessary subdirectories.
  472 +#
  473 +snap_pre: .PHONY check_DESTDIR check_RELEASEDIR distribution
  474 + ${INSTALL} -d -m 755 ${RELEASEDIR}
  475 +.if ${MKUPDATE} == "no"
  476 +# Could be a mount point, ignore the errors
  477 + -/bin/rm -rf ${RELEASEDIR}/${RELEASEMACHINEDIR}
  478 +.endif
  479 + ${INSTALL} -d -m 755 ${RELEASEDIR}/${RELEASEMACHINEDIR}
  480 +.for dir in ${INSTALLATION_DIRS}
  481 + ${INSTALL} -d -m 755 ${RELEASEDIR}/${RELEASEMACHINEDIR}/${dir}
  482 +.endfor
  483 +
  484 +# snap_post --
  485 +# Build the install media and notes from distrib
  486 +#
  487 +snap_post: .PHONY .MAKE build_kernelsets build_releasekernels
  488 +.if ${MKUPDATE} == "no"
  489 + cd ${NETBSDSRCDIR}/distrib && ${MAKE} cleandir
  490 +.endif
  491 + cd ${NETBSDSRCDIR}/distrib && ${MAKE} depend && ${MAKE} && \
  492 + ${MAKE} release
  493 +
  494 +# build kernels --
  495 +# This target builds the kernels specified by each port.
  496 +# A port may specify the following kernels:
  497 +#
  498 +# KERNEL_SETS The list of kernels that will be
  499 +# packaged into sets, named
  500 +# kern-${kernel}.tgz. These kernels
  501 +# are also placed in the binary/kernel
  502 +# area of the release package as
  503 +# netbsd-${kernel}.gz.
  504 +#
  505 +# EXTRA_KERNELS Additional kernels to place in the
  506 +# binary/kernel area of the release
  507 +# package as netbsd-${kernel}.gz, but
  508 +# which are not placed into sets. This
  509 +# allows a port to provide e.g. a netbootable
  510 +# installation kernel containing a ramdisk.
  511 +#
  512 +# BUILD_KERNELS Additional kernels to build which are
  513 +# not placed into sets nor into the
  514 +# binary/kernel area of the release
  515 +# package. These are typically kernels
  516 +# that are built for inclusion only in
  517 +# installation disk/CD-ROM/tape images.
  518 +#
  519 +# A port may also specify KERNEL_SUFFIXES, which is an optional list
  520 +# of filename suffixes for kernels to include in the kernel sets and
  521 +# in the binary/kernel area of the release package (e.g. "netbsd" vs.
  522 +# "netbsd.ecoff" and "netbsd.srec"). It is not an error if kernels
  523 +# with these suffixes do not exist in the kernel build directory.
  524 +#
  525 +#
  526 +# A list of all the kernels to build, which can be overridden from
  527 +# external sources (such as make(1)'s environment or command line)
  528 +#
  529 +ALL_KERNELS?= ${KERNEL_SETS} ${EXTRA_KERNELS} ${BUILD_KERNELS}
  530 +
  531 +GETKERNELAWK= awk '/^config/ {print $$2; found=1} \
  532 + END{ if (found == 0) print "netbsd"; }'
  533 +
  534 +build_kernels: .PHONY
  535 +# Configure & compile kernels listed in ${ALL_KERNELS}
  536 +#
  537 +# The 'sync' is so that all writes during the build are pushed back
  538 +# to the disk. Not having it causes problems on some host systems
  539 +# (e.g. Linux) when building on NFS.
  540 +#
  541 +.if !defined(KERNELS_DONE) # {
  542 +.for configfile in ${ALL_KERNELS} # {
  543 +build_kernels: kern-${configfile}
  544 +kern-${configfile}: .PHONY .MAKE
  545 + cd ${KERNCONFDIR} && ${TOOL_CONFIG} -s ${KERNSRCDIR} \
  546 + -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile}
  547 +.if ${MKUPDATE} == "no"
  548 + cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} distclean
  549 +.endif
  550 + cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} depend && ${MAKE}
  551 + sync
  552 +.endfor # ALL_KERNELS # }
  553 +.endif # KERNELS_DONE # }
  554 +
  555 +build_kernelsets: .PHONY
  556 +# Create kernel sets from ${KERNEL_SETS} into
  557 +# ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets
  558 +#
  559 +.for configfile in ${KERNEL_SETS} # {
  560 +build_kernelsets: kernset-${configfile}
  561 +kernset-${configfile}: .PHONY build_kernels snap_pre
  562 + @ kernlist=`${GETKERNELAWK} ${KERNCONFDIR}/${configfile}`; \
  563 + kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
  564 + kernsuffixes="${KERNEL_SUFFIXES:S/^/./}"; \
  565 + kern_tgz=${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets/kern-${configfile}.tgz; \
  566 + pax_cmd="GZIP=-9 ${TOOL_PAX} -O -zw -M -N ${NETBSDSRCDIR}/etc -f $${kern_tgz}"; \
  567 + cd $${kerndir} && { \
  568 + kernels=; newest=; \
  569 + for kernel in $${kernlist}; do \
  570 + for s in "" $${kernsuffixes}; do \
  571 + ks="$${kernel}$${s}"; \
  572 + [ -f $${ks} ] || continue; \
  573 + kernels="$${kernels} $${ks}"; \
  574 + [ -z "$${newest}" -o $${ks} -nt "$${newest}" ] && \
  575 + newest=$${ks}; \
  576 + done; \
  577 + done; \
  578 + [ $${kern_tgz} -nt "$${newest}" ] || { \
  579 + echo "echo $${kernels} | $${pax_cmd}"; \
  580 + ( echo "/set uname=${BINOWN} gname=${BINGRP}"; \
  581 + echo ". type=dir optional"; \
  582 + for kernel in $${kernels}; do \
  583 + echo "./$${kernel} type=file"; \
  584 + done ) | eval $${pax_cmd}; \
  585 + } \
  586 + }
  587 +.endfor # KERNEL_SETS # }
  588 +
  589 +build_releasekernels: .PHONY
  590 +# Build kernel.gz from ${KERNEL_SETS} ${EXTRA_KERNELS} into
  591 +# ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel
  592 +#
  593 +.for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS} # {
  594 +build_releasekernels: releasekern-${configfile}
  595 +releasekern-${configfile}: .PHONY build_kernels snap_pre
  596 + @ kernlist=`${GETKERNELAWK} ${KERNCONFDIR}/${configfile:C/.*\///}`; \
  597 + kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
  598 + kernsuffixes="${KERNEL_SUFFIXES:S/^/./}"; \
  599 + cd $${kerndir} && { \
  600 + for kernel in $${kernlist}; do \
  601 + for s in "" $${kernsuffixes}; do \
  602 + ks="$${kernel}$${s}"; \
  603 + [ ! -f $${ks} ] && continue; \
  604 + knl_gz="${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/$${ks}-${configfile:C/.*\///}.gz"; \
  605 + [ $${knl_gz} -nt $${ks} ] && continue; \
  606 + echo "gzip -c -9 < $${kerndir}/$${ks} > $${knl_gz}"; \
  607 + gzip -c -9 < $${ks} > $${knl_gz}; \
  608 + done; \
  609 + done; \
  610 + }
  611 +.endfor # KERNEL_SETS EXTRA_KERNELS # }
  612 +
  613 +# snap_md_post --
  614 +# Machine dependent distribution media operations.
  615 +# Overridden by etc.$MACHINE/Makefile.inc
  616 +#
  617 +snap_md_post: .PHONY check_DESTDIR check_RELEASEDIR snap_post
  618 +# (empty -- look in the machine-dependent Makefile.inc)
  619 +
  620 +
  621 +clean:
  622 + -rm -rf ${CDROM.dir} ${CDROM.pathlist} ${OBSOLETE.dir}
  623 +
  624 +.include <bsd.prog.mk>
  625 +
  626 +test:
  627 + @echo ${OBSOLETE.files}
4 etc/defaults/rc.conf
... ... @@ -1,4 +1,4 @@
1   -# $NetBSD: rc.conf,v 1.90 2007/08/27 10:59:05 pavel Exp $
  1 +# $NetBSD: rc.conf,v 1.90.6.1 2008/02/18 22:07:01 mjf Exp $
2 2 #
3 3 # /etc/defaults/rc.conf --
4 4 # default configuration of /etc/rc.conf
@@ -303,6 +303,8 @@ wdogctl=NO # watchdog timer control
303 303 irdaattach=NO # attach serial lines to IrDA
304 304 irdaattach_flags="tty00"
305 305
  306 +devfsd=YES devfsd_flags="" # devfs daemon
  307 +
306 308 # Configuration of "wscons" console driver virtual screens.
307 309 #
308 310 wscons=NO wscons_flags="" # setup wscons from wscons.conf
0  sbin/devfsd/test.cfg → etc/devfsd.conf 100644 → 100755
File renamed without changes
4 etc/rc.d/Makefile
... ... @@ -1,4 +1,4 @@
1   -# $NetBSD: Makefile,v 1.66 2007/07/14 21:20:31 ad Exp $
  1 +# $NetBSD: Makefile,v 1.66.8.1 2008/02/18 22:07:01 mjf Exp $
2 2
3 3 .include <bsd.own.mk>
4 4
@@ -12,7 +12,7 @@ CONFIGFILES=\
12 12 accounting altqd amd apmd \
13 13 bootconf.sh bootparams btconfig btdevctl bthcid btuartd \
14 14 ccd cgd cleartmp cron \
15   - dhclient dhcpd dhcrelay dmesg downinterfaces envsys \
  15 + devfsd dhclient dhcpd dhcrelay dmesg downinterfaces envsys \
16 16 fsck ftpd \
17 17 hostapd \
18 18 identd ifwatchd inetd ipfilter ipfs ipmon ipnat ipsec \
30 etc/rc.d/devfsd
... ... @@ -0,0 +1,30 @@
  1 +#!/bin/sh
  2 +#
  3 +# $NetBSD: devfsd,v 1.1.2.1 2008/02/18 22:07:01 mjf Exp $
  4 +#
  5 +
  6 +# BEFORE: disks
  7 +# PROVIDE: devs
  8 +
  9 +# The devfsd is configured VERY early, so that /dev can be populated
  10 +# with device special nodes.
  11 +
  12 +$_rc_subr_loaded . /etc/rc.subr
  13 +
  14 +name="devfsd"
  15 +rcvar=$name
  16 +
  17 +start_cmd="devfsd_start"
  18 +stop_cmd="devfsd_stop"
  19 +status_cmd="devfsd_status"
  20 +
  21 +extra_commands="status"
  22 +
  23 +devfsd_start()
  24 +{
  25 + echo "Starting devfsd."
  26 + /sbin/devfsd ${devfsd_flags}
  27 +}
  28 +
  29 +load_rc_config $name
  30 +run_rc_command "$1"
3  etc/rc.d/wdogctl
... ... @@ -1,9 +1,10 @@
1 1 #!/bin/sh
2 2 #
3   -# $NetBSD: wdogctl,v 1.2 2004/08/13 18:08:03 mycroft Exp $
  3 +# $NetBSD: wdogctl,v 1.2.22.1 2008/02/18 22:07:01 mjf Exp $
4 4 #
5 5
6 6 # BEFORE: disks
  7 +# REQUIRE: devs
7 8
8 9 # The watchdog is configured VERY early, so that any problems that
9 10 # occur during the bootstrap process are protected by the watchdog.
3  sbin/Makefile
... ... @@ -1,4 +1,4 @@
1   -# $NetBSD: Makefile,v 1.107.2.2 2008/02/18 21:04:16 mjf Exp $
  1 +# $NetBSD: Makefile,v 1.107.2.3 2008/02/18 22:07:01 mjf Exp $
2 2 # @(#)Makefile 8.5 (Berkeley) 3/31/94
3 3
4 4 # Not ported: XNSrouted enpload scsiformat startslip
@@ -26,6 +26,7 @@ SUBDIR+= newfs_msdos fsck_msdos
26 26 SUBDIR+= newfs_sysvbfs
27 27 SUBDIR+= mount_ados
28 28 SUBDIR+= mount_cd9660
  29 +SUBDIR+= mount_devfs
29 30 SUBDIR+= mount_efs
30 31 SUBDIR+= mount_ext2fs
31 32 SUBDIR+= mount_fdesc
8 sbin/devfsd/Makefile
... ... @@ -1,11 +1,13 @@
1   -# $NetBSD: Makefile,v 1.1.2.1 2007/12/08 22:05:04 mjf Exp $
  1 +# $NetBSD: Makefile,v 1.1.2.2 2008/02/18 22:07:02 mjf Exp $
2 2
3 3 PROG= devfsd
4   -SRCS= devfsd.c devfsd_dev.c devfsd_rule.c
  4 +SRCS= devfsd.c devfsd_dev.c devfsd_mount.c devfsd_rule.c
5 5 MAN= devfsd.8
6 6
7 7 DPADD= ${LIBUTIL}
8   -LDADD= -lutil
  8 +LDADD= -lutil -lprop
  9 +
  10 +CFLAGS=-g
9 11
10 12 WARNS= 4
11 13
81 sbin/devfsd/devfsd.8
... ... @@ -0,0 +1,81 @@
  1 +.\" $NetBSD: devfsd.8,v 1.1.2.1 2008/02/18 22:07:02 mjf Exp $
  2 +.\"
  3 +.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
  4 +.\" All rights reserved.
  5 +.\"
  6 +.\" This code is derived from software contributed to The NetBSD Foundation
  7 +.\" by Matt Fleming.
  8 +.\"
  9 +.\" Redistribution and use in source and binary forms, with or without
  10 +.\" modification, are permitted provided that the following conditions
  11 +.\" are met:
  12 +.\" 1. Redistributions of source code must retain the above copyright
  13 +.\" notice, this list of conditions and the following disclaimer.
  14 +.\" 2. Redistributions in binary form must reproduce the above copyright
  15 +.\" notice, this list of conditions and the following disclaimer in the
  16 +.\" documentation and/or other materials provided with the distribution.
  17 +.\"
  18 +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  19 +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  20 +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  21 +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  22 +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  23 +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  24 +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  25 +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  26 +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  27 +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  28 +.\" POSSIBILITY OF SUCH DAMAGE.
  29 +.\"
  30 +.Dd December 8, 2007
  31 +.Dt DEVFSD 8
  32 +.Sh NAME
  33 +.Nm devfsd
  34 +.Nd Create device special files in a device file system
  35 +.Sh SYNOPSIS
  36 +.Nm
  37 +.Op Fl iv
  38 +.Sh DESCRIPTION
  39 +.Nm
  40 +is a daemon that controls the device special
  41 +nodes in a
  42 +.Tn devfs
  43 +file system.
  44 +.Nm
  45 +is started at boot time and monitors device insertion
  46 +and removal via the
  47 +.Xr dctl 4
  48 +device driver. When a device is attached
  49 +to the system is it run against rules specifed in the
  50 +config file. If no config file is specified
  51 +.Pa /etc/devfsd.conf
  52 +is used. See
  53 +.Xr devfsd.conf 5 .
  54 +.Nm
  55 +interacts with the kernel via
  56 +.Xr dctl 4
  57 +in order to create device special files.
  58 +The options are as follows:
  59 +.Bl -tag
  60 +Read rules from the specified configuration file.
  61 +.It Fl i
  62 +Set the default visibility of device special nodes to invisible.
  63 +.It Fl v
  64 +Set the default visibility of device special nodes to visible.
  65 +.El
  66 +.Sh FILES
  67 +.Pa /etc/devfsd.conf
  68 +.Sh SEE ALSO
  69 +.Xr dctl 4 ,
  70 +.Xr devfsd.conf 5
  71 +.Sh HISTORY
  72 +The
  73 +.Nm
  74 +daemon first appeared in
  75 +.Nx 5.0 .
  76 +.Sh AUTHORS
  77 +The
  78 +.Nm
  79 +daemon was implemented by
  80 +.An Matt Fleming.
  81 +
351 sbin/devfsd/devfsd.c
... ... @@ -1,7 +1,7 @@
1   -/* $NetBSD: devfsd.c,v 1.1.2.1 2007/12/08 22:05:04 mjf Exp $ */
  1 +/* $NetBSD: devfsd.c,v 1.1.2.2 2008/02/18 22:07:02 mjf Exp $ */
2 2
3 3 /*-
4   - * Copyright (c) 2007 The NetBSD Foundation, Inc.
  4 + * Copyright (c) 2008 The NetBSD Foundation, Inc.
5 5 * All rights reserved.
6 6 *
7 7 * This code is derived from software contributed to The NetBSD Foundation
@@ -36,12 +36,14 @@
36 36 #include <sys/errno.h>
37 37 #include <sys/ioctl.h>
38 38
39   -#include <sys/dev/dctlvar.h>
  39 +#include <dev/dctl/dctlio.h>
40 40
41 41 #include <err.h>
  42 +#include <errno.h>
42 43 #include <fcntl.h>
43 44 #include <locale.h>
44 45 #include <stdio.h>
  46 +#include <stdbool.h>