免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 729 | 回复: 0
打印 上一主题 下一主题

sunray4 on CentOS 5简易指南 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-10-01 11:51 |只看该作者 |倒序浏览

1) 安装所有必需安装的软件,目前已知需预先安装的软件包括glib(i386), dhcp,
openldap(i386), openldap-clients(i386), xinetd, tftp-server, jre,
apache-tomcat或apache
2) 替换系统自带的ksh,用CentOS4.5的pdksh代替;
如果使用x86_64版本系统,替换gdm为CentOS5的i386版本
3) 创建软链接
mkdir -p /usr/X11R6/lib
ln -s /usr/share/X11 /usr/X11R6/lib/
ln -s /usr/bin/xkbcomp /usr/share/X11/xkb/
ln -s /usr/lib/libldap.so /usr/lib/libldap.so.199
ln -s /usr/lib/liblber.so /usr/lib/liblber.so.199
4) 如果需要的话,修改/etc/hosts文件(与utadm有关)
修改前:
$hostname -i
127.0.0.1
$cat /etc/hosts
127.0.0.1        sunray2.genomics.org.cn sunray2 localhost.localdomain
localhost
修改后:
$hostname -i
192.168.0.1
$cat /etc/hosts
127.0.0.1       localhost.localdomain localhost
192.168.0.1     sunray2.genomics.org.cn sunray2
5) 修改utinstall脚本,让脚本执行完释放安装文件后等待用户输入,然后修改
$TMP_DIR/opt/SUNWut/lib/iu_modules/M08GDM,让安装程序使用系统自带的GDM
添加以下内容到$TMP_DIR/opt/SUNWut/sbin/utinstall $ARGS语句之前:
echo "Modify '$TMP_DIR/opt/SUNWut/lib/iu_modules/M08GDM', then press
Enter to continue."
read pause
6) utinstall开始安装sunray,按提示修改相应的M08GDM文件,在Module_Init()
找到下面语句:
       rpm --quiet -q ${GDM_PACKAGE_NAME} > /dev/null 2>&1
       OUR_GDM_NOT_INSTALLED=$?   #----->>> 修改成=0
回到utinstall脚本,按Enter继续安装
7) 给sunray的模块打补丁,并重新编译
cd /usr/src
wget
http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/modules-3.1.1.diff
patch -p0 /etc/X11/gdm/SunRayPostLogin/
PreSessionScriptDir=/etc/X11/gdm/SunRayPreSession/
PostSessionScriptDir=/etc/X11/gdm/SunRayPostSession/
DisplayInitDir=/etc/X11/gdm/SunRayInit
DynamicXServers=true
RebootCommand=
HaltCommand=
SuspendCommand=
HibernateCommand=
10) 重启
/opt/SUNWut/sbin/utadm -a eth1
/opt/SUNWut/sbin/utconfig
diff -ru SUNWut.orig/utadem/utadem.c SUNWut/utadem/utadem.c
--- SUNWut.orig/utadem/utadem.c        2006-10-27 23:26:36.000000000 +0200
+++ SUNWut/utadem/utadem.c        2007-03-20 12:43:33.000000000 +0100
@@ -11,7 +11,7 @@

#include
#include
-#include
+#include
#include
#include
#include
@@ -25,6 +25,7 @@
#include
#include
#include
+#include
#include
#include

@@ -2284,6 +2285,9 @@
        int ret;
        struct uta_connect *conn = file->private_data;

+        if (!conn)
+                 return -ENOENT;
+
        DPRINTF(2, "entering %s()\n", __FUNCTION__);

        if (conn->role == UTA_USER || conn->role == UTA_MIXER)
@@ -2294,6 +2298,17 @@
        return (ret);
}

+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,10)
+static long
+utadem_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+{
+        if (!filp || !filp->f_dentry)
+                return -ENOENT;
+
+        return utadem_ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
+}
+#endif
+
static int
utadsp_open(struct inode *inode, struct file *file)
{
@@ -2407,6 +2422,9 @@
        write:                utadsp_write,
        poll:                utadsp_poll,
        ioctl:                utadem_ioctl,
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,10)
+        compat_ioctl:        utadem_compat_ioctl,
+#endif
        open:                utadsp_open,
        release:        utadsp_release,
};
@@ -2481,6 +2499,9 @@
        owner:                THIS_MODULE,
        llseek:                no_llseek,
        ioctl:                utadem_ioctl,
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,10)
+        compat_ioctl:        utadem_compat_ioctl,
+#endif
        open:                utamix_open,
        release:        utamix_release,
};
@@ -2547,6 +2568,7 @@
                }
        }

+#if LINUX_VERSION_CODE                 /* HDIO */
#include                 /* create_proc_read_entry */
#include                         /* __init macro */
+#include
#include                         /* command values*/
#include                 /* SCSI_IOCTL_SEND_COMMAND */
#include                 /* MAX_COMMAND_SIZE */
@@ -47,6 +48,7 @@
static int utdisk_release(struct inode *inodep, struct file *fp);
static int utdisk_media_changed(struct gendisk *gdp);
static int utdisk_revalidate_disk(struct gendisk *gdp);
+static int utdisk_getgeo(struct block_device *bdevp, struct hd_geometry *geo);
static int utdisk_ioctl(struct inode *inodep, struct file *fp,
                        unsigned int cmd, unsigned long arg);
static int utdisk_make_request(request_queue_t *q, struct bio *bio);
@@ -69,6 +71,9 @@
        .release =                utdisk_release,
        .media_changed =        utdisk_media_changed,
        .revalidate_disk =        utdisk_revalidate_disk,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+        .getgeo =               utdisk_getgeo,
+#endif
};


@@ -632,6 +637,55 @@
         return (0);
}

+static int utdisk_getgeo(struct block_device *bdevp, struct hd_geometry *geo) {
+        struct gendisk                *gdp;
+        utdisk_state_t                *dsp;
+
+        utprintf("%s:\n", __FUNCTION__);
+
+        /* sanity check */
+        if ((bdevp == NULL)
+                        || ((gdp = bdevp->bd_disk) == NULL)
+                        || ((dsp = gdp->private_data) == NULL)
+                        || (utvalidate_dsp(dsp) == 0)) {
+                utprintf("%s: bad argument\n", __FUNCTION__);
+                return (-EINVAL);
+        }
+
+        utprintf("%s: dsp = %p ctlmin = %x nblocks = %d\n", __FUNCTION__, dsp, dsp->ctlmin, dsp->nblocks );
+
+        if (down_interruptible(&(dsp->lock)) == 0) {
+                if ((dsp->flags & UTDISK_STATE_STALE) != 0) {
+                        utprintf("%s: stale device %d\n", __FUNCTION__,
+                                        dsp->ctlmin);
+                        up(&(dsp->lock));
+                        return (-ENXIO);
+                }
+                up(&(dsp->lock));
+        } else {
+                utprintf("%s: locking interrupted\n", __FUNCTION__);
+                return (-EIO);
+        }
+
+        if (dsp->nblocks != 0) {
+                geo->heads = UTDISK_DEFAULT_HEADS;
+                geo->sectors = UTDISK_DEFAULT_SECTORS;
+                geo->cylinders = (dsp->nblocks /
+                                (UTDISK_DEFAULT_HEADS * UTDISK_DEFAULT_SECTORS));
+                geo->start = get_start_sect(bdevp);
+        } else {
+                geo->heads = 0;
+                geo->sectors = 0;
+                geo->cylinders = 0;
+                geo->start = 0;
+                utstk_check_media(dsp, bdevp);
+        }
+
+        utprintf("%s: geo heads = %d sectors = %d cylinders = %d start = %lx\n", __FUNCTION__,
+                        geo->heads, geo->sectors, geo->cylinders, geo->start );
+
+        return 0;
+}

/*
  * make a transfer request
diff -ru SUNWut.orig/utdisk/utdiskctl.c SUNWut/utdisk/utdiskctl.c
--- SUNWut.orig/utdisk/utdiskctl.c        2006-10-27 23:26:41.000000000 +0200
+++ SUNWut/utdisk/utdiskctl.c        2007-02-11 00:28:37.000000000 +0100
@@ -23,6 +23,7 @@
#include                         /* module entry-point macros */
#include                         /* device entry points */
#include                 /* create_proc_read_entry */
+#include
#include                 /* userland access */
#include "utdisk.h"
#include "utdiskctl.h"
@@ -61,6 +62,9 @@
                                size_t count, loff_t *ppos);
static int        utstk_ioctl(struct inode *inode, struct file *fp,
                                unsigned int command, unsigned long arg);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,10)
+static long utstk_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
+#endif
static int        utstk_get_ctl_major(unsigned long arg, int flag32ptr);
static int        utstk_get_disk_major(unsigned long arg, int flag32ptr);
static int        utstk_hotplug(unsigned long arg, int flag32ptr);
@@ -89,6 +93,11 @@
        .open         =        utstk_open,
        .release =        utstk_release,
        .ioctl         =        utstk_ioctl,
+#if defined(CONFIG_COMPAT) || defined(CONFIG_SPARC64) || defined(CONFIG_X86_64) || defined(CONFIG_PPC64)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,10)
+        .compat_ioctl         =        utstk_compat_ioctl,
+#endif
+#endif
        .owner         =        THIS_MODULE,
};

@@ -184,6 +193,7 @@

#if defined(CONFIG_COMPAT) || defined(CONFIG_SPARC64) || defined(CONFIG_X86_64) || defined(CONFIG_PPC64)
/* This function tags all 32-bit ioctls so later code knows pointers are 32-bits */
+#if LINUX_VERSION_CODE f_dentry->d_inode, filp, cmd | UTDISK_32BIT_PTRS, arg);
+}
+#endif
#endif        /* CONFIG_COMPAT */


@@ -258,6 +277,7 @@

        utprintf("%s: major=%d\n", __FUNCTION__, utdc_major);

+#if LINUX_VERSION_CODE
+#include
#include
#include
#include
@@ -26,6 +26,7 @@
#include
#include
#include
+#include
#include
#include

@@ -193,6 +194,8 @@
static int daemon_write(struct file *file, const char *ubuf, size_t size);
static int daemon_ioctl(struct inode *inode, struct file *file,
     unsigned int cmd, unsigned long arg);
+static int compat_daemon_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file);
+static int compat_paralleld_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file);
static unsigned int daemon_poll(struct file *file,
     struct poll_table_struct *wait);

@@ -1480,6 +1483,11 @@
        utio_pmsg_t pmsg;
        int ret;

+#if defined(CONFIG_COMPAT) || defined(CONFIG_SPARC64) || defined(CONFIG_X86_64) || defined(CONFIG_PPC64)
+        if (cmd == COMPAT_PPGETTIME)
+                return (compat_paralleld_ioctl(0, cmd, arg, file));
+#endif
+
        DPRINTF(2, "entering %s()\n", __FUNCTION__);

        if (!sess || !has_daemon(sess))
@@ -1672,6 +1680,12 @@

        /* these don't require the session to exist */
        switch (cmd) {
+#if defined(CONFIG_COMPAT) || defined(CONFIG_SPARC64) || defined(CONFIG_X86_64) || defined(CONFIG_PPC64)
+        case COMPAT_UTIO_GETMSG:
+                return (compat_daemon_ioctl(0, cmd, arg, file));
+        case COMPAT_UTIO_PUTMSG:
+                return (compat_daemon_ioctl(0, cmd, arg, file));
+#endif
        case UTIO_GETVERSION:
                DPRINTF(3, " - UTIO_GETVERSION\n");
                return (put_user(UTIO_VERSION, (unsigned long *)arg));
@@ -2026,6 +2040,14 @@
        return (ret);
}

+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,10)
+static long
+utio_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+{
+        return utio_ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
+}
+#endif
+
static int
utio_open(struct inode *inode, struct file *file)
{
@@ -2187,6 +2209,9 @@
        write:                utio_write,
        poll:                utio_poll,
        ioctl:                utio_ioctl,
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,10)
+        compat_ioctl:        utio_compat_ioctl,
+#endif
        open:                utio_open,
        release:        utio_release,
};
@@ -2255,6 +2280,7 @@
            return (-ENOMEM);
        }

+#if LINUX_VERSION_CODE
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/42898/showart_393458.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP