\documentclass[letterpaper]{article}
\nonstopmode
\akai
\usepackage{linuxdoc-sgml}
\usepackage{qwertz}
\usepackage{url}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[english]{babel}
\usepackage{epsfig}
\usepackage{null}
\def\addbibtoc{
\addcontentsline{toc}{section}{\numberline{\mbox{}}\relax\bibname}
}%end-preamble
\setcounter{page}{1}
\title{Linux ADSM Mini-Howto}
\author{×÷Õß: by Thomas K\"onig, {\ttfamily Thomas.Koenig@ciw.uni-karlsruhe.de}
ÒëÕß: Mile Yeh {\ttfamily mile@mail.timenet.net}}
\date{v, 15 January 1997}
\abstract{ÕâÎÄ¼þÃèÊöÈçºÎÔÚ Linux/i386 Ö®ÖÐÕë¶ÔÉÌÒµÐÔµÄ ADSM ±¸·ÝÏµÍ³È¥°²×°Ê¹ÓÃÒ»¸ö¿Í»§¶Ë.}


\begin{document}
\maketitle
\tableofcontents

\section{½éÉÜ}

ADSM ÊÇÒ»¸öÓÉ IBM Âô³öÇÒÒÔÍøÂ·Îª»ù´¡µÄ±¸·ÝÏµÍ³,ËüÔÚ¶àÊý×éÖ¯ÖÐÊ¹ÓÃ
ÆäÖÐ°üº­ÓÐÐí¶à¸÷Ê½¸÷ÑùµÄÏµÍ³ (²»Í¬µÄÆ·ÅÆµÄ UNIX,ÊÓ´°ÏµÁÐ, Novell, Mac,ÊÓ´° NT).
²»ÐÒµÄ,ÔÚÕâ¸öÊ±ºòÃ»ÓÐÔ­ÉúµÄ Linux °æ±¾.

Äã±ØÐëÒªÊ¹ÓÃ SCO ¶þ½øÎ»Ôªµµ,°²×° iBCS2-emulator
À´Ö´ÐÐ ADSM.Õâ·ÝÃèÊöÊÇÕë¶Ô ADSM v2r1.

µ±ÎÒÐ´µÄÍ¬Ê±,ÕâÊÇÎÒÎ¨Ò»µÄ·¢¾õµ½¿ÉÒÔ
Óë i386°æ±¾µÄ Linux Ò»Æð¹¤×÷µÄ°æ±¾.


\section{°²×° iBCS Ä£×é}

iBCS2Ä£×éÊÇ¿ÉÒÔ´Ó´Ë´¦È¡µÃ
\onlynameurl{ftp://tsx-11.mit.edu/pub/linux/BETA/ibcs2}. Èç¹ûÄãÊÇÖ´ÐÐºËÐÄ
°æ±¾ 1.2.13,È¡µÃ ½â¿ªËüÕâÔËÓÃ
{\ttfamily ibcs-1.2-950721.tar.gz}, ½â¿ªËüÕâÔËÓÃ
{\ttfamily ibcs-1.2-950808.patch1}  {\ttfamily ibcs-1.2-950828.patch2}.
ÄãÄÜ¹»È»áá¼üÈë {\tt\char`\"}{\ttfamily make}{\tt\char`\"}È»ááÊ¹ÓÃ
{\tt\char`\"}{\ttfamily insmod}{\tt\char`\"} °²×° iBCS modlue ;.

Õë¶ÔÒ»¸ö 2.0ºËÐÄ°æ±¾,È¡µÃ {\ttfamily ibcs-2.0-960610.tar.gz},½â¿ªËü·ÅÔÚÒ»¸ö
ºÏÊÊµÄ·ÅÖÃ,¸Ä±äÄ¿Â¼µ½´ËÄ¿Â¼ÖÐ,Ê¹ÓÃÏÂÁÐÐÞ²¹µµ:
\begin{verbatim}

--- iBCSemul/ipc.c.orig Wed Jan 15 21:32:15 1997
+++ iBCSemul/ipc.c      Wed Jan 15 21:32:31 1997
@@ -212,7 +212,7 @@
        switch (command) {
                case U_SEMCTL:
                        cmd = ibcs_sem_trans(arg3);
-                       arg4 = (union semun *)get_syscall_parameter (regs, 4);
+                       arg4 = (union semun *)(((unsigned long *) regs->esp) + (5));
                        is_p = (struct ibcs_semid_ds *)get_fs_long(arg4->buf);
 #ifdef IBCS_TRACE
                        if ((ibcs_trace & TRACE_API) || ibcs_func_p->trace)
\end{verbatim}

È»áá,¸´ÖÆ {\ttfamily CONFIG.i386}µ½ {\ttfamily CONFIG},¼üÈë {\ttfamily make}.

Èç¹ûÄãÃ»ÓÐÒÑÓÐÕâÐ©Éè±¸,ÒÀÖøÏÂÁÐÖ´ÐÐ½¨Á¢±ØÒªµÄÉè±¸µµ°¸

\begin{verbatim}
# cd /dev
# ln -s null XOR
# ln -s null X0R
# mknod socksys c 30 0
# mknod spx c 30 1
\end{verbatim}





\section{°²×° ADSM¿Í»§¶Ë}

SCO¶þ½øÎ»ÔªµµµÄÊÇÓÉÈý¸ö tar µµ°¸Ìá¹©µÄ,»òÕßÓÉ´ÅµúÌá¹©.¸Ä±äÂ·¾¶µ½
¸ùÄ¿Â¼,¸ù¾ÝÄãµÄÕþ²ßÉè¶¨ÄãµÄ umask ,È»áá
ÔÚÒ»¸öÄ¿Â¼½â¿ªËûÃÇ (Æ©Èç ¸ùÄ¿Â¼).ÔÚÄ¿Â¼ /tmp,Äã»á
ÕÒµ½Ò»¸ö³ÌÐòµµ;Ö´ÐÐËü

ÕâÊ±ÄãÒª±ØÐëÊÖ¶¯±à¼­ {\ttfamily /usr/adsm/dsm.sys}
{\ttfamily /usr/adsm/dsm.opt}.
ÔÚ {\ttfamily dsm.sys},ÖØÒªµÄÐÐÊýÏêÏ¸ËµÃ÷ÈçÏÂ:
\begin{description}
\item[Servername] \mbox{}

The name of the server(ËÅ·þÆ÷Ãû³Æ)

\item[TCPServeraddress] \mbox{}

ËÅ·þÆ÷ DNS È«Ãû

\item[NODename] \mbox{}

ÄãµÄ×Ô¼ºµÄÖ÷»úÃû

\end{description}

In {\ttfamily dsm.opt},Äã±ØÐëÒªÏêÏ¸ËµÃ÷
\begin{description}
\item[Server] \mbox{}

ÈçÍ¬Ç°ÃæµÄÃèÊö

\item[Followsymbolic] \mbox{}

Òª»ò²»Òª¸úËæ·ûºÅÁ¬½Óµã (Ò»°ãÀ´Ëµ£¬²»ÊÇÒ»¸öºÃÖ÷Òâ)

\item[SUbdir] \mbox{}

Ö§Ô®×ÓÄ¿Â¼ (ÄãÍ¨³£ÐèÒªËü)

\item[domain] \mbox{}

µµ°¸ÏµÍ³±¸·Ý

\end{description}


ÕâÊ±ÄãÒª±ØÐë´´ÔìÒ»¸ö SCO-ÏàÈÝµÄ {\ttfamily /etc/mnttab}
´ÓÄãµÄ {\ttfamily /etc/fstab}.Äã¿ÉÒÔÊ¹ÓÃÏÂÁÐ¸÷Ïî Perl ³ÌÐòµµ,
{\ttfamily fstab2mnttab},¶Ôì¶Õâ.
\begin{tscreen}
\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
#!/usr/bin/perl

$mnttab_struct = "a32 a32 I L";
open(MTAB, "/etc/mtab") || die "Cannot open /etc/mtab: $!\n";
open(MNTTAB, ">/etc/mnttab") || die "Cannot open /etc/mnttab: $!\n";

while(<MTAB>) {
    next if /pid/;
    chop;
    /^(\S*)\s(\S*)\s(\S*)\s.*$/;
    $device = $1;
    $mountpt = $2;
    $fstype = $3;
    if($fstype ne "nfs" && $fstype ne "proc") {
        $mnttab_rec =
            pack($mnttab_struct, $device, $mountpt, 0x9d2f, time());
        syswrite(MNTTAB, $mnttab_rec, 72);
        print "Made entry for: $device $mountpt $fstype\n";
    }
}

close(MNTTAB);
exit 0;
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}
\end{tscreen}

Õë¶ÔÕâÐ©¿Í»§¶ËÄã²»ÐèÒª°²×°ÈÎºÎµÄ¹²Ïí³ÌÊ½¿â;
Ã¿¼þÊÂÊÇÁ´½Óµ½¹Ì¶¨³ÌÐò¿â.




\section{Ö´ÐÐ¿Í»§¶Ë}

ÓÐÁ½ÖÖ¿Í»§¶Ë, {\ttfamily dsm},Ò»ÖÖÊÇ X11½çÃæ, 
{\ttfamily dsmc},Ò»¸öÃüÁîÐÐ½çÃæ.ÄãµÄµçÄÔÖÐÐÄ»á¸æËßÄãÈçºÎ²Ù×÷
Ëü.Ò»Ð©Æð¶¯Ê±µÄÆð¶¯³ÌÐòµµ,ÀýÈç
\begin{verbatim}
dsmc schedule -quiet 2>&1 >/dev/null &
\end{verbatim}


¿ÉÄÜ½«ÊÇÐèÒªµÄ


\section{ÒÑÖªµÄÎÊÌâ}

²»ÐÒµÄ, SCO Ö»ÄÜ´¦Àí±È 8 ¸ö×ÖÔª»¹¶ÌµÄÖ÷»úÃû
.Èç¹ûÄãµÄÖ÷»úÃû¸ü³¤,»òÕßÊÇÓÃ Internet È«Ãû,ÄãÒ²Ðí
ÐèÒªÔÚ {\ttfamily NODename}line in
{\ttfamily /usr/adsm/dsm.sys}ÐÐÏêÏ¸ËµÃ÷ÄãµÄ»úÆ÷Ãû..

Èç¹ûÄãÊ¹ÓÃ DISPLAY ±äÊý,ÄãÒª±ØÐëÌá¹©
ËÅ·þÆ÷ DNS È«Ãû (¾ÙÀý. {\ttfamily DISPLAY=host.full.do.main:0} instead of
{\ttfamily DISPLAY=host:0}).

\end{document}
