head	1.3;
access;
symbols
	netbsd-11-0-RC4:1.3
	netbsd-11-0-RC3:1.3
	netbsd-11-0-RC2:1.3
	netbsd-11-0-RC1:1.3
	perseant-exfatfs-base-20250801:1.3
	netbsd-11:1.3.0.6
	netbsd-11-base:1.3
	netbsd-10-1-RELEASE:1.3
	perseant-exfatfs-base-20240630:1.3
	perseant-exfatfs:1.3.0.4
	perseant-exfatfs-base:1.3
	netbsd-8-3-RELEASE:1.2
	netbsd-9-4-RELEASE:1.2
	netbsd-10-0-RELEASE:1.3
	netbsd-10-0-RC6:1.3
	netbsd-10-0-RC5:1.3
	netbsd-10-0-RC4:1.3
	netbsd-10-0-RC3:1.3
	netbsd-10-0-RC2:1.3
	netbsd-10-0-RC1:1.3
	netbsd-10:1.3.0.2
	netbsd-10-base:1.3
	netbsd-9-3-RELEASE:1.2
	cjep_sun2x-base1:1.2
	cjep_sun2x:1.2.0.24
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	netbsd-9-2-RELEASE:1.2
	cjep_staticlib_x:1.2.0.22
	cjep_staticlib_x-base:1.2
	netbsd-9-1-RELEASE:1.2
	phil-wifi-20200421:1.2
	phil-wifi-20200411:1.2
	is-mlppp:1.2.0.20
	is-mlppp-base:1.2
	phil-wifi-20200406:1.2
	netbsd-8-2-RELEASE:1.2
	netbsd-9-0-RELEASE:1.2
	netbsd-9-0-RC2:1.2
	netbsd-9-0-RC1:1.2
	phil-wifi-20191119:1.2
	netbsd-9:1.2.0.18
	netbsd-9-base:1.2
	phil-wifi-20190609:1.2
	netbsd-8-1-RELEASE:1.2
	netbsd-8-1-RC1:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	netbsd-7-2-RELEASE:1.1.20.1
	pgoyette-compat-0728:1.2
	netbsd-8-0-RELEASE:1.2
	phil-wifi:1.2.0.16
	phil-wifi-base:1.2
	pgoyette-compat-0625:1.2
	netbsd-8-0-RC2:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	netbsd-8-0-RC1:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	netbsd-7-1-2-RELEASE:1.1.20.1
	pgoyette-compat:1.2.0.14
	pgoyette-compat-base:1.2
	netbsd-7-1-1-RELEASE:1.1.20.1
	matt-nb8-mediatek:1.2.0.12
	matt-nb8-mediatek-base:1.2
	perseant-stdc-iso10646:1.2.0.10
	perseant-stdc-iso10646-base:1.2
	netbsd-8:1.2.0.8
	netbsd-8-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.6
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	pgoyette-localcount-20170320:1.2
	netbsd-7-1:1.1.20.1.0.6
	netbsd-7-1-RELEASE:1.1.20.1
	netbsd-7-1-RC2:1.1.20.1
	netbsd-7-nhusb-base-20170116:1.1.20.1
	bouyer-socketcan:1.2.0.4
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	netbsd-7-1-RC1:1.1.20.1
	pgoyette-localcount-20161104:1.2
	netbsd-7-0-2-RELEASE:1.1.20.1
	localcount-20160914:1.2
	netbsd-7-nhusb:1.1.20.1.0.4
	netbsd-7-nhusb-base:1.1.20.1
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.2
	pgoyette-localcount-base:1.2
	netbsd-7-0-1-RELEASE:1.1.20.1
	netbsd-7-0:1.1.20.1.0.2
	netbsd-7-0-RELEASE:1.1.20.1
	netbsd-7-0-RC3:1.1.20.1
	netbsd-7-0-RC2:1.1.20.1
	netbsd-7-0-RC1:1.1.20.1
	netbsd-6-0-6-RELEASE:1.1
	netbsd-6-1-5-RELEASE:1.1
	netbsd-7:1.1.0.20
	netbsd-7-base:1.1
	yamt-pagecache-base9:1.1
	yamt-pagecache-tag8:1.1
	netbsd-6-1-4-RELEASE:1.1
	netbsd-6-0-5-RELEASE:1.1
	tls-earlyentropy:1.1.0.18
	tls-earlyentropy-base:1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1
	riastradh-drm2-base3:1.1
	netbsd-6-1-3-RELEASE:1.1
	netbsd-6-0-4-RELEASE:1.1
	netbsd-6-1-2-RELEASE:1.1
	netbsd-6-0-3-RELEASE:1.1
	netbsd-6-1-1-RELEASE:1.1
	riastradh-drm2-base2:1.1
	riastradh-drm2-base1:1.1
	riastradh-drm2:1.1.0.12
	riastradh-drm2-base:1.1
	netbsd-6-1:1.1.0.16
	netbsd-6-0-2-RELEASE:1.1
	netbsd-6-1-RELEASE:1.1
	netbsd-6-1-RC4:1.1
	netbsd-6-1-RC3:1.1
	agc-symver:1.1.0.14
	agc-symver-base:1.1
	netbsd-6-1-RC2:1.1
	netbsd-6-1-RC1:1.1
	yamt-pagecache-base8:1.1
	netbsd-6-0-1-RELEASE:1.1
	yamt-pagecache-base7:1.1
	matt-nb6-plus-nbase:1.1
	yamt-pagecache-base6:1.1
	netbsd-6-0:1.1.0.10
	netbsd-6-0-RELEASE:1.1
	netbsd-6-0-RC2:1.1
	tls-maxphys:1.1.0.8
	tls-maxphys-base:1.1
	matt-nb6-plus:1.1.0.6
	matt-nb6-plus-base:1.1
	netbsd-6-0-RC1:1.1
	yamt-pagecache-base5:1.1
	yamt-pagecache-base4:1.1
	netbsd-6:1.1.0.4
	netbsd-6-base:1.1
	yamt-pagecache-base3:1.1
	yamt-pagecache-base2:1.1
	yamt-pagecache:1.1.0.2
	yamt-pagecache-base:1.1;
locks; strict;
comment	@# @;


1.3
date	2021.08.05.12.45.33;	author kre;	state Exp;
branches;
next	1.2;
commitid	HIAQ1m5oaA9tvM3D;

1.2
date	2015.02.15.15.56.30;	author jmcneill;	state Exp;
branches;
next	1.1;
commitid	c42v2ueVTHS6w7ay;

1.1
date	2011.08.29.11.38.48;	author mrg;	state Exp;
branches
	1.1.20.1;
next	;

1.1.20.1
date	2015.02.17.14.45.31;	author martin;	state Exp;
branches;
next	;
commitid	wcriglz21o1P4nay;


desc
@@


1.3
log
@
Expunge bogus (implementation defined / unspecified) uses of $@@ in
scripts.   $@@ is unspecified except when used in a place where
field splitting can occur (which is never in an assignment),
X=$@@ (with or without double quotes) is simply wrong.

Use $* instead of $@@ in such places, or as here, simply change
the way things are done (very very slightly) and DTRT.
@
text
@#!/bin/sh
#
# $NetBSD: 01-makedev,v 1.2 2015/02/15 15:56:30 jmcneill Exp $
#
# Try to create a device node if it doesn't exist
#

event="$1"
shift

case $event in
device-attach)
	cd /dev && sh MAKEDEV -u "$@@" 2>/dev/null
	;;
esac
@


1.2
log
@At startup, instead of doing run-hooks for each device, call run-hooks
once with a list of all found devices. This lets us batch calls to MAKEDEV
which results in a noticeable improvement in Raspberry Pi boot time.

Run the initial device enumeration hooks before detaching from the foreground,
ensuring that any required devices have been created before the rc.d script
exits.
@
text
@d3 1
a3 1
# $NetBSD: 01-makedev,v 1.1 2011/08/29 11:38:48 mrg Exp $
a9 1
devices=$@@
d13 1
a13 1
	cd /dev && sh MAKEDEV -u $devices 2>/dev/null
@


1.1
log
@add the device publish daemon, written by jmcneill@@.

listens on drvctl for new devices and invokes MAKEDEV for them.

missing:
  - manual page
  - rc.d script
  - more testing

but it works well enough to make new disk nodes appear in /dev when
netbsd sees them and they're missing.  you will need to make sure
you have a new /dev/MAKEDEV for this to work properly (postinstall
should handle this normally, of course.)


thanks jared!
@
text
@d3 1
a3 1
# $NetBSD$
d9 2
a10 1
device="$2"
d14 1
a14 1
	cd /dev && sh MAKEDEV -u "$device" 2>/dev/null
@


1.1.20.1
log
@Pull up following revision(s) (requested by jmcneill in ticket #525):
	sbin/devpubd/hooks/01-makedev: revision 1.2
	sbin/devpubd/devpubd-run-hooks.in: revision 1.3
	sbin/devpubd/Makefile: revision 1.5
	sbin/devpubd/hooks/02-wedgenames: revision 1.2
	sbin/devpubd/devpubd.c: revision 1.3
	sbin/devpubd/devpubd.c: revision 1.4
At startup, instead of doing run-hooks for each device, call run-hooks
once with a list of all found devices. This lets us batch calls to MAKEDEV
which results in a noticeable improvement in Raspberry Pi boot time.
Run the initial device enumeration hooks before detaching from the foreground,
ensuring that any required devices have been created before the rc.d script
exits.
let's make this compile again.
@
text
@d3 1
a3 1
# $NetBSD: 01-makedev,v 1.1 2011/08/29 11:38:48 mrg Exp $
d9 1
a9 2
shift
devices=$@@
d13 1
a13 1
	cd /dev && sh MAKEDEV -u $devices 2>/dev/null
@


