changeset 13640:2cb107f54874

2187 EOF mkdtab infrastructure Reviewed by: Richard Lowe <richlowe@richlowe.net> Reviewed by: Alexander <alexander.r.eremin@gmail.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Richard Lowe <richlowe@richlowe.net>
author Milan Jurik <milan.jurik@xylab.cz>
date Sat, 17 Mar 2012 13:50:09 -0500
parents 4c26102b6754
children 9efb7f317b8a
files usr/src/Targetdirs usr/src/cmd/devmgmt/Makefile usr/src/cmd/devmgmt/data/device.tab usr/src/cmd/devmgmt/data/dgroup.tab usr/src/cmd/devmgmt/mkdtab/Makefile usr/src/cmd/devmgmt/mkdtab/mkdtab.c usr/src/cmd/initpkg/init.d/Makefile usr/src/cmd/initpkg/init.d/mkdtab usr/src/cmd/initpkg/rc2.d/mk.rc2.d.sh usr/src/pkg/manifests/SUNWcs.mf
diffstat 10 files changed, 2 insertions(+), 676 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/Targetdirs	Tue Jun 21 18:04:33 2011 -0700
+++ b/usr/src/Targetdirs	Sat Mar 17 13:50:09 2012 -0500
@@ -313,8 +313,6 @@
 	/usr/sadm/install \
 	/usr/sadm/install/bin \
 	/usr/sadm/install/scripts \
-	/usr/sadm/sysadm \
-	/usr/sadm/sysadm/add-ons \
 	/usr/sbin \
 	/usr/sbin/$(MACH32) \
 	/usr/share  \
--- a/usr/src/cmd/devmgmt/Makefile	Tue Jun 21 18:04:33 2011 -0700
+++ b/usr/src/cmd/devmgmt/Makefile	Sat Mar 17 13:50:09 2012 -0500
@@ -20,8 +20,6 @@
 # CDDL HEADER END
 #
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
 # Copyright 1990,2003 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
@@ -30,7 +28,7 @@
 
 include ../Makefile.cmd
 
-SUBDIRS = cmds data mkdtab
+SUBDIRS = cmds data
 
 all:=           TARGET= all
 install:=       TARGET= install
--- a/usr/src/cmd/devmgmt/data/device.tab	Tue Jun 21 18:04:33 2011 -0700
+++ b/usr/src/cmd/devmgmt/data/device.tab	Sat Mar 17 13:50:09 2012 -0500
@@ -1,5 +1,3 @@
-#ident	"%Z%%M%	%I%	%E% SMI"       /* SVr4.0 1.10.1.1 */
-#
 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
@@ -39,7 +37,4 @@
 #			where attr is the attribute name and value is the
 #			value of that attribute.
 #
-ctape1:/dev/rSA/ctape1:/dev/SA/ctape1::desc="Cartridge Tape Drive" fmtcmd="/etc/ctcfmt" type="ctape" display="true" volume="cartridge tape"
-disk1:/dev/rdsk/c1d0s6:/dev/dsk/c1d0s6::desc="Disk Drive" type="disk" display="true" remove="true" part="true"
-disk2:/dev/rdsk/c1d1s6:/dev/dsk/c1d1s6::desc="Disk Drive" type="disk" display="true" remove="true" part="true"
 spool:::/var/spool/pkg:desc="Packaging Spool Directory"
--- a/usr/src/cmd/devmgmt/data/dgroup.tab	Tue Jun 21 18:04:33 2011 -0700
+++ b/usr/src/cmd/devmgmt/data/dgroup.tab	Sat Mar 17 13:50:09 2012 -0500
@@ -1,5 +1,3 @@
-#ident	"%Z%%M%	%I%	%E% SMI"       /* SVr4.0 1.2 */
-#
 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
@@ -32,6 +30,3 @@
 #	members		Comma-list of members in the group.  A member is the
 #			device alias of the device that belongs in the group
 #
-ctape:ctape1,ctape2
-diskette:diskette1
-disk:disk1,disk2
--- a/usr/src/cmd/devmgmt/mkdtab/Makefile	Tue Jun 21 18:04:33 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# cmd/devmgmt/mkdtab/Makefile
-#
-
-PROG= 	mkdtab
-
-include ../../Makefile.cmd
-
-ROOTCMDDIR = $(ROOT)/usr/sadm/sysadm/bin
-LIBADMDIR = ../../../lib/libadm/inc
-CPPFLAGS += -I$(LIBADMDIR)
-
-LDLIBS += -ladm -lgen
-FILEMODE= 0755
-CFLAGS += $(CCVERBOSE)
-
-.KEEP_STATE:
-
-all: $(PROG)
-
-install: all $(ROOTCMD)
-
-clean:
-
-lint:	lint_PROG
-
-include ../../Makefile.targ
--- a/usr/src/cmd/devmgmt/mkdtab/mkdtab.c	Tue Jun 21 18:04:33 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,560 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
-/*	  All Rights Reserved  	*/
-
-#include	<stdio.h>
-#include	<stdlib.h>
-#include	<string.h>
-#include	<fcntl.h>
-#include	<sys/types.h>
-#include	<unistd.h>
-#include	<devmgmt.h>
-#include	<devtab.h>
-#include	<dirent.h>
-#include	<libgen.h>
-#include	<sys/stat.h>
-#include	<sys/vtoc.h>
-#include	<sys/vfstab.h>
-
-/*
- * Update device.tab and dgroup.tab to reflect current configuration.
- * Designed so it can be run either once at installation time or after
- * every reboot.  The alias naming scheme used is non-intuitive but
- * is consistent with existing conventions and documentation and with
- * the device numbering scheme used by the disks command.
- * Code borrowed liberally from prtconf, disks and prtvtoc commands.
- */
-
-/*
- * make this long enough to start out with.
- * there are place we write into putdevcmd
- * where we are not testing for overrun.
- */
-#define	ORIGLEN	1024
-
-struct dpart {
-	char		alias[20];
-	char		*cdevice;
-	char		*bdevice;
-	diskaddr_t	capacity;
-};
-
-static int		vfsnum;
-static char		*putdevcmd;
-static char		cmd[80];
-static int		lastlen = ORIGLEN;
-#ifdef att3b2
-static struct mainedt	*edtp;
-#endif
-static struct vfstab	*vfstab;
-
-static void checkandresize(int);
-
-static char *
-memstr(const char *str)
-{
-	char	*mem;
-
-	if ((mem = (char *)malloc((uint_t)strlen(str) + 1)) == NULL) {
-		(void) fprintf(stderr,
-		    "%s: can't update device tables:Out of memory\n", cmd);
-		exit(1);
-	}
-	return (strcpy(mem, str));
-}
-
-
-
-/*
- * Add device table entry for the floppy drive.
- */
-static void
-fdisk(const int diskno, const char *disknm)
-{
-	if (snprintf(putdevcmd, lastlen, "/usr/bin/putdev -a diskette%d "
-	    "cdevice=/dev/r%s bdevice=/dev/%s desc=\"Floppy Drive\" "
-	    "mountpt=/mnt volume=diskette "
-	    "type=diskette removable=true capacity=2880 "
-	    "fmtcmd=\"/usr/bin/fdformat -f -v /dev/r%s\" "
-	    "erasecmd=\"/usr/sbin/fdformat -f -v /dev/r%s\" "
-	    "removecmd=\"/usr/bin/eject\" copy=true "
-	    "mkfscmd=\"/usr/sbin/mkfs -F ufs /dev/r%s 2880 18 "
-	    "2 4096 512 80 2 5 3072 t\"",
-	    diskno, disknm, disknm, disknm, disknm, disknm) >= lastlen) {
-		(void) fprintf(stderr,
-		    "%s: Command too long: %s\n", cmd, putdevcmd);
-		exit(1);
-	}
-	(void) system(putdevcmd);
-}
-
-static void
-do_fdisks(void)
-{
-	DIR *dp;
-	struct dirent *dirp;
-	int drive = 1;
-
-	if ((dp = opendir("/dev")) == NULL) {
-		(void) fprintf(stderr, "%s: can't open /dev\n", cmd);
-		return;
-	}
-
-	while ((dirp = readdir(dp)) != NULL) {
-		if (gmatch(dirp->d_name, "diskette*")) {
-			fdisk(drive++, dirp->d_name);
-		}
-	}
-
-	(void) closedir(dp);
-}
-
-/*
- * hdisk() gets information about the specified hard drive from the vtoc
- * and vfstab and adds the disk and partition entries to device.tab. If
- * we can't access the raw disk we simply assume it isn't properly configured
- * and we add no entries to device.tab.
- */
-static void
-hdisk(const int drive, const char *drivepfx)
-{
-	char		*cdskpath;
-	char		*bdskpath;
-	char		*mountpoint;
-	int		i, j, dpartcnt, fd;
-	struct extvtoc	vtoc;
-	static struct dpart    *dparttab;
-
-	if ((cdskpath = (char *)malloc(strlen(drivepfx) + 13)) == NULL) {
-		(void) fprintf(stderr, "%s: Memory request failed\n", cmd);
-		exit(1);
-	}
-
-	(void) snprintf(cdskpath, strlen(drivepfx) + 13, "/dev/rdsk/%ss2",
-	    drivepfx);
-	if ((fd = open(cdskpath, O_RDONLY)) == -1) {
-		free(cdskpath);
-		return;
-	}
-
-
-	/*
-	 * Read volume table of contents.
-	 */
-	if (read_extvtoc(fd, &vtoc) < 0) {
-		(void) close(fd);
-		free(cdskpath);
-		return;
-	}
-
-	(void) close(fd);
-
-	/*
-	 * Begin building the putdev command string that will be
-	 * used to make the entry for this disk.
-	 */
-
-	if ((bdskpath = (char *)malloc(strlen(drivepfx) + 13)) == NULL) {
-		(void) fprintf(stderr, "%s: Memory request failed\n", cmd);
-		exit(1);
-	}
-
-	(void) snprintf(bdskpath, strlen(drivepfx) + 13, "/dev/dsk/%ss2",
-	    drivepfx);
-	if (snprintf(putdevcmd, lastlen, "/usr/bin/putdev -a disk%d "
-	    "cdevice=%s bdevice=%s "
-	    "desc=\"Disk Drive\" type=disk "
-	    "part=true removable=false capacity=%llu dpartlist=",
-	    drive, cdskpath, bdskpath, vtoc.v_part[2].p_size) >= lastlen) {
-		(void) fprintf(stderr,
-		    "%s: Command too long: %s\n", cmd, putdevcmd);
-		exit(1);
-	}
-
-	free(cdskpath);
-	free(bdskpath);
-
-	/*
-	 * Build a table of disk partitions we are interested in and finish
-	 * the putdev command string for the disk by adding the dpartlist.
-	 */
-
-	if ((dparttab =
-	    (struct dpart *)malloc((int)vtoc.v_nparts *
-	    sizeof (struct dpart))) == NULL) {
-		(void) fprintf(stderr,
-		    "%s: can't disk partitions table: Out of memory\n", cmd);
-		exit(1);
-	}
-
-	dpartcnt = 0;
-	for (i = 0; i < (int)vtoc.v_nparts; ++i) {
-		if (vtoc.v_part[i].p_size == 0 || vtoc.v_part[i].p_flag != 0)
-			continue;
-		(void) sprintf(dparttab[dpartcnt].alias, "dpart%d%02d", drive,
-		    i);
-
-		if ((dparttab[dpartcnt].cdevice =
-		    (char *)malloc(strlen(drivepfx) + 14)) == NULL) {
-			(void) fprintf(stderr, "%s: Out of memory\n", cmd);
-			exit(1);
-		}
-
-		(void) snprintf(dparttab[dpartcnt].cdevice,
-		    strlen(drivepfx) + 14, "/dev/rdsk/%ss%x", drivepfx, i);
-		if ((dparttab[dpartcnt].bdevice =
-		    (char *)malloc(strlen(drivepfx) + 14)) == NULL) {
-			(void) fprintf(stderr, "%s: Out of memory\n", cmd);
-			exit(1);
-		}
-		(void) snprintf(dparttab[dpartcnt].bdevice,
-		    strlen(drivepfx) + 14, "/dev/dsk/%ss%x", drivepfx, i);
-		dparttab[dpartcnt].capacity = vtoc.v_part[i].p_size;
-
-		if (dpartcnt != 0)
-			(void) strcat(putdevcmd, ",");
-		(void) strcat(putdevcmd, dparttab[dpartcnt].alias);
-		dpartcnt++;
-	}
-
-	(void) system(putdevcmd);
-
-	/*
-	 * We assemble the rest of the information about the partitions by
-	 * looking in the vfstab.
-	 */
-	for (i = 0; i < dpartcnt; i++) {
-		for (j = 0; j < vfsnum; j++) {
-			if (vfstab[j].vfs_special != NULL &&
-			    strcmp(dparttab[i].bdevice,
-			    vfstab[j].vfs_special) == 0)
-				break;
-		}
-		if (j < vfsnum) {
-			/*
-			 * Partition found in vfstab.
-			 */
-			if (vfstab[j].vfs_mountp == NULL ||
-			    strcmp(vfstab[j].vfs_mountp, "-") == 0)
-				mountpoint = "/mnt";
-			else
-				mountpoint = vfstab[j].vfs_mountp;
-			if (snprintf(putdevcmd, lastlen, "/usr/bin/putdev "
-			    "-a %s cdevice=%s bdevice=%s "
-			    "desc=\"Disk Partition\" type=dpart "
-			    "removable=false capacity=%llu dparttype=fs "
-			    "fstype=%s mountpt=%s", dparttab[i].alias,
-			    dparttab[i].cdevice, dparttab[i].bdevice,
-			    dparttab[i].capacity, vfstab[j].vfs_fstype,
-			    mountpoint) >= lastlen) {
-					(void) fprintf(stderr,
-					    "%s: Command too long: %s\n",
-					    cmd, putdevcmd);
-					exit(1);
-				}
-				(void) system(putdevcmd);
-		}
-		free(dparttab[i].cdevice);
-		free(dparttab[i].bdevice);
-	}
-	free(dparttab);
-}
-
-static void
-do_hdisks(void)
-{
-	DIR *dp;
-	struct dirent *dirp;
-	int drive = 1;	char disknm[MAXNAMLEN+1];
-
-	if ((dp = opendir("/dev/rdsk")) == NULL) {
-		(void) fprintf(stderr, "%s: can't open /dev/rdsk\n", cmd);
-		return;
-	}
-
-	while ((dirp = readdir(dp)) != NULL) {
-		if (gmatch(dirp->d_name, "c[0-9]*s2")) {
-			(void) strcpy(disknm, dirp->d_name);
-			/*
-			 * now know off the 's2'
-			 */
-			disknm[strlen(disknm)-2] = '\0';
-			/*
-			 * And do it!
-			 */
-			hdisk(drive++, disknm);
-		}
-	}
-
-	(void) closedir(dp);
-}
-
-
-/*
- * Add device table entry for the cartridge tape drive.
- */
-static void
-tape(const int driveno, const char *drivenm)
-{
-	if (snprintf(putdevcmd, lastlen, "/usr/bin/putdev -a ctape%d "
-	    "cdevice=/dev/rmt/%s "
-	    "desc=\"Tape Drive\" volume=\"tape\" "
-	    "type=ctape removable=true capacity=45539 bufsize=15872 "
-	    "erasecmd=\"/usr/bin/mt -f /dev/rmt/%s erase\" "
-	    "removecmd=\"/usr/bin/mt -f /dev/rmt/%s offline\"",
-	    driveno, drivenm, drivenm, drivenm) >= lastlen) {
-		(void) fprintf(stderr,
-		    "%s: Command too long: %s\n", cmd, putdevcmd);
-		exit(1);
-	}
-	(void) system(putdevcmd);
-}
-
-static void
-do_tapes(void)
-{
-	DIR *dp;
-	struct dirent *dirp;
-
-	if ((dp = opendir("/dev/rmt")) == NULL) {
-		(void) fprintf(stderr, "%s: can't open /dev/rmt\n", cmd);
-		return;
-	}
-
-	while ((dirp = readdir(dp)) != NULL) {
-		if (gmatch(dirp->d_name, "[0-9]") ||
-		    gmatch(dirp->d_name, "[1-9][0-9]")) {
-			tape(atoi(dirp->d_name), dirp->d_name);
-		}
-	}
-
-	(void) closedir(dp);
-}
-
-static void
-initialize(void)
-{
-	FILE		*fp;
-	int		i;
-	struct vfstab	vfsent;
-	char		*criteria[5];
-	char		**olddevlist;
-
-	/*
-	 * Build a copy of vfstab in memory for later use.
-	 */
-	if ((fp = fopen("/etc/vfstab", "r")) == NULL) {
-		(void) fprintf(stderr,
-		    "%s: can't update device tables:Can't open /etc/vfstab\n",
-		    cmd);
-		exit(1);
-	}
-
-	/*
-	 * Go through the vfstab file once to get the number of entries so
-	 * we can allocate the right amount of contiguous memory.
-	 */
-	vfsnum = 0;
-	while (getvfsent(fp, &vfsent) == 0)
-		vfsnum++;
-	rewind(fp);
-
-	if ((vfstab = (struct vfstab *)malloc(vfsnum * sizeof (struct vfstab)))
-	    == NULL) {
-		(void) fprintf(stderr,
-		    "%s: can't update device tables:Out of memory\n", cmd);
-		exit(1);
-	}
-
-	/*
-	 * Go through the vfstab file one more time to populate our copy in
-	 * memory.  We only populate the fields we'll need.
-	 */
-	i = 0;
-	while (getvfsent(fp, &vfsent) == 0 && i < vfsnum) {
-		if (vfsent.vfs_special == NULL)
-			vfstab[i].vfs_special = NULL;
-		else
-			vfstab[i].vfs_special = memstr(vfsent.vfs_special);
-		if (vfsent.vfs_mountp == NULL)
-			vfstab[i].vfs_mountp = NULL;
-		else
-			vfstab[i].vfs_mountp = memstr(vfsent.vfs_mountp);
-		if (vfsent.vfs_fstype == NULL)
-			vfstab[i].vfs_fstype = NULL;
-		else
-			vfstab[i].vfs_fstype = memstr(vfsent.vfs_fstype);
-		i++;
-	}
-	(void) fclose(fp);
-
-	/*
-	 * Now remove all current entries of type disk, dpart, ctape
-	 * and diskette from the device and device group tables.
-	 * Any changes made manually since the last time this command
-	 * was run will be lost.  Note that after this we are committed
-	 * to try our best to rebuild the tables (i.e. the command
-	 * should try not to fail completely after this point).
-	 */
-	criteria[0] = "type=disk";
-	criteria[1] = "type=dpart";
-	criteria[2] = "type=ctape";
-	criteria[3] = "type=diskette";
-	criteria[4] = (char *)NULL;
-	olddevlist = getdev((char **)NULL, criteria, 0);
-	_enddevtab();	/* getdev() should do this but doesn't */
-
-	putdevcmd = malloc(ORIGLEN);
-
-	if (putdevcmd == NULL) {
-		perror("malloc");
-		exit(-1);
-	}
-
-	(void) memset(putdevcmd, 0, ORIGLEN);
-
-	for (i = 0; olddevlist[i] != (char *)NULL; i++) {
-		if (snprintf(putdevcmd, lastlen,
-		    "/usr/bin/putdev -d %s", olddevlist[i]) >= lastlen) {
-			(void) fprintf(stderr,
-			    "%s: Command too long: %s\n", cmd, putdevcmd);
-			exit(1);
-		}
-		(void) system(putdevcmd);
-	}
-
-	(void) sprintf(putdevcmd, "/usr/bin/putdgrp -d disk 2>/dev/null");
-	(void) system(putdevcmd);
-	(void) sprintf(putdevcmd, "/usr/bin/putdgrp -d dpart 2>/dev/null");
-	(void) system(putdevcmd);
-	(void) sprintf(putdevcmd, "/usr/bin/putdgrp -d ctape 2>/dev/null");
-	(void) system(putdevcmd);
-	(void) sprintf(putdevcmd, "/usr/bin/putdgrp -d diskette 2>/dev/null");
-	(void) system(putdevcmd);
-}
-
-
-/*
- * Update the dgroup.tab file with information from the updated device.tab.
- */
-static void
-mkdgroups(void)
-{
-	int	i;
-	char	*criteria[2];
-	char	**devlist;
-
-	criteria[1] = (char *)NULL;
-
-	criteria[0] = "type=disk";
-
-	devlist = getdev((char **)NULL, criteria, DTAB_ANDCRITERIA);
-
-	(void) sprintf(putdevcmd, "/usr/bin/putdgrp disk");
-	for (i = 0; devlist[i] != (char *)NULL; i++) {
-		checkandresize((strlen(putdevcmd) + strlen(devlist[i]) + 2));
-		(void) strcat(putdevcmd, " ");
-		(void) strcat(putdevcmd, devlist[i]);
-	}
-	if (i != 0)
-		(void) system(putdevcmd);
-
-	criteria[0] = "type=dpart";
-
-	devlist = getdev((char **)NULL, criteria, DTAB_ANDCRITERIA);
-
-	(void) sprintf(putdevcmd, "/usr/bin/putdgrp dpart");
-	for (i = 0; devlist[i] != (char *)NULL; i++) {
-		checkandresize((strlen(putdevcmd) + strlen(devlist[i]) + 2));
-		(void) strcat(putdevcmd, " ");
-		(void) strcat(putdevcmd, devlist[i]);
-	}
-	if (i != 0)
-		(void) system(putdevcmd);
-
-	criteria[0] = "type=ctape";
-
-	devlist = getdev((char **)NULL, criteria, DTAB_ANDCRITERIA);
-
-	(void) sprintf(putdevcmd, "/usr/bin/putdgrp ctape");
-	for (i = 0; devlist[i] != (char *)NULL; i++) {
-		checkandresize((strlen(putdevcmd) + strlen(devlist[i]) + 2));
-		(void) strcat(putdevcmd, " ");
-		(void) strcat(putdevcmd, devlist[i]);
-	}
-	if (i != 0)
-		(void) system(putdevcmd);
-
-	criteria[0] = "type=diskette";
-
-	devlist = getdev((char **)NULL, criteria, DTAB_ANDCRITERIA);
-
-	(void) sprintf(putdevcmd, "/usr/bin/putdgrp diskette");
-	for (i = 0; devlist[i] != (char *)NULL; i++) {
-		checkandresize((strlen(putdevcmd) + strlen(devlist[i]) + 2));
-		(void) strcat(putdevcmd, " ");
-		(void) strcat(putdevcmd, devlist[i]);
-	}
-	if (i != 0)
-		(void) system(putdevcmd);
-}
-
-static void
-checkandresize(int size)
-{
-	if (size >= lastlen) {
-		putdevcmd = realloc(putdevcmd, lastlen * 2);
-		lastlen = lastlen * 2;
-	}
-}
-
-/*ARGSUSED*/
-int
-main(int argc, char **argv)
-{
-	(void) strncpy(cmd, argv[0], 80);
-
-	initialize();
-
-	/*
-	 * AT&T code looked at the 3B2 EDT here.  Since we have a known-good
-	 * /dev directory ( presuming 'disks' has already been run), we simply
-	 * look in the /dev subdirectories.
-	 */
-	do_hdisks();
-
-	do_fdisks();
-
-	do_tapes();
-
-	/*
-	 * Update the dgroup.tab file.
-	 */
-	mkdgroups();
-
-	return (0);
-
-}
--- a/usr/src/cmd/initpkg/init.d/Makefile	Tue Jun 21 18:04:33 2011 -0700
+++ b/usr/src/cmd/initpkg/init.d/Makefile	Sat Mar 17 13:50:09 2012 -0500
@@ -35,7 +35,6 @@
 	dhcp		\
 	drvconfig	\
 	ldap.client	\
-	mkdtab		\
 	nfs.server	\
 	nscd		\
 	sendmail	\
--- a/usr/src/cmd/initpkg/init.d/mkdtab	Tue Jun 21 18:04:33 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#!/sbin/sh
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright (c) 1994-1997 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-
-#
-# Update device.tab and dgroup.tab files to reflect configuration.
-# Script runs once at installation time and then removes itself.
-#
-
-if [ -x /usr/sadm/sysadm/bin/mkdtab ]; then
-	/usr/sadm/sysadm/bin/mkdtab
-	/usr/bin/rm -f /etc/rc2.d/S82mkdtab
-	/usr/sbin/removef SUNWcsr /etc/rc2.d/S82mkdtab > /dev/null 2>&1
-	/usr/sbin/removef -f SUNWcsr > /dev/null 2>&1
-fi
--- a/usr/src/cmd/initpkg/rc2.d/mk.rc2.d.sh	Tue Jun 21 18:04:33 2011 -0700
+++ b/usr/src/cmd/initpkg/rc2.d/mk.rc2.d.sh	Sat Mar 17 13:50:09 2012 -0500
@@ -28,8 +28,7 @@
 COMMON_STARTLST="\
 20sysetup \
 70uucp \
-73cachefs.daemon \
-82mkdtab"
+73cachefs.daemon"
 
 INSDIR=${ROOT}/etc/rc2.d
 
--- a/usr/src/pkg/manifests/SUNWcs.mf	Tue Jun 21 18:04:33 2011 -0700
+++ b/usr/src/pkg/manifests/SUNWcs.mf	Sat Mar 17 13:50:09 2012 -0500
@@ -233,9 +233,6 @@
 dir path=usr/sadm/bin
 dir path=usr/sadm/install
 dir path=usr/sadm/install/scripts
-dir path=usr/sadm/sysadm
-dir path=usr/sadm/sysadm/add-ons
-dir path=usr/sadm/sysadm/bin
 dir path=usr/sbin
 $(i386_ONLY)dir path=usr/sbin/$(ARCH32)
 dir path=usr/sbin/$(ARCH64)
@@ -383,7 +380,6 @@
 file path=etc/init.d/README group=sys preserve=true
 file path=etc/init.d/cachefs.daemon group=sys mode=0744 preserve=true
 file path=etc/init.d/ldap.client group=sys mode=0744
-file path=etc/init.d/mkdtab group=sys mode=0744 preserve=true
 file path=etc/init.d/nscd group=sys mode=0744
 file path=etc/init.d/sysetup group=sys mode=0744 preserve=true
 file path=etc/init.d/ufs_quota group=sys mode=0744 preserve=true
@@ -1290,7 +1286,6 @@
 file path=usr/sadm/install/scripts/r.manifest group=sys mode=0555
 file path=usr/sadm/install/scripts/r.pkcs11conf group=sys mode=0555
 file path=usr/sadm/install/scripts/r.rbac group=sys mode=0555
-file path=usr/sadm/sysadm/bin/mkdtab mode=0755
 file path=usr/sadm/ugdates mode=0444
 $(i386_ONLY)file path=usr/sbin/$(ARCH32)/add_drv group=sys mode=0555
 $(i386_ONLY)file path=usr/sbin/$(ARCH32)/modinfo group=sys mode=0555
@@ -1493,7 +1488,6 @@
 hardlink path=etc/rc2.d/S20sysetup target=../../etc/init.d/sysetup
 hardlink path=etc/rc2.d/S73cachefs.daemon \
     target=../../etc/init.d/cachefs.daemon
-hardlink path=etc/rc2.d/S82mkdtab target=../../etc/init.d/mkdtab
 hardlink path=etc/rc2.d/S89PRESERVE target=../../etc/init.d/PRESERVE
 $(sparc_ONLY)hardlink path=etc/svc/profile/platform_SUNW,Sun-Fire-V890.xml \
     target=./platform_SUNW,Sun-Fire-880.xml