QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2188|回复: 2

汉化slax609遇到的ntfs中文显示的麻烦【已解决】

[复制链接]
发表于 2008-12-30 14:29:25 | 显示全部楼层 |阅读模式
这回遇到真正的麻烦了——ntfs中文显示的麻烦

用fanx2的rc.local,不能自动挂载,点击存储介质的ntfs分区后,可挂载上,正常显示中文名了。


#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.


fc-cache -f -v
cd /usr/share/fonts/TTF
mkfontscale
cp fonts.scale fonts.dir

hd_vfat=`fdisk -l | awk '/FAT32/{print $1}'`
hd_ntfs=`fdisk -l | awk '/NTFS/{print $1}'`

i=0
for file in $hd_vfat
      do
         vfat_hd=$file
         let i="$i+1"
      done

j=0
for file in $hd_ntfs
      do
         ntfs_hd[j]=$file
         let j="$j+1"
      done
I=0
while [ $I -lt $i ]
      do
         umount "${vfat_hd[$I]}"
         vfat_mnt=`echo  ${vfat_hd[$I]} | awk -F/ '{print $3}' `
         mount -t vfat -o iocharset=cp936 "${vfat_hd[$I]}" "/mnt/$vfat_mnt"
         let I="$I+1"
      done
J=0
while [ $J -lt $j ]
      do

umount "${ntfs_hd[$J]}"
        ntfs_mnt=`echo ${ntfs_hd[$J]} | awk -F/ '{print $3}' `
        ntfsmount -o locale=zh_CN.gbk "${ntfs_hd[$J]}" "/mnt/$ntfs_mnt"
        let J="$J+1"
     done


fanxbeta2的:
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.


fc-cache -f -v
cd /usr/share/fonts/TTF
mkfontscale
cp fonts.scale fonts.dir

hd_ntfs=`fdisk -l | awk '/NTFS/{print $1}'`

j=0
for file in $hd_ntfs
      do
         ntfs_hd[j]=$file
         let j="$j+1"
      done

J=0
while [ $J -lt $j ]
      do
         umount "${ntfs_hd[$J]}"
         ntfs_mnt=`echo ${ntfs_hd[$J]} | awk -F/ '{print $3}' `
         ntfsmount -o locale=zh_CN.gbk "${ntfs_hd[$J]}" "/mnt/$ntfs_mnt"
         let J="$J+1"
      done


小平刚给我的:——这个在登录k桌面时出错了
#!/bin/sh
hd_vfat=`fdisk -l | awk '/FAT32/{print $1}'`
hd_ntfs=`fdisk -l | awk '/NTFS/{print $1}'`

i=0
for file in $hd_vfat
      do
         vfat_hd=$file
         let i="$i+1"
      done
j=0
for file in $hd_ntfs
      do
         ntfs_hd[j]=$file
         let j="$j+1"
      done

I=0
while [ $I -lt $i ]
      do
         umount "${vfat_hd[$I]}"
         vfat_mnt=`echo  ${vfat_hd[$I]} | awk -F/ '{print $3}' `
         mount -t vfat -o iocharset=cp936 "${vfat_hd[$I]}" "/mnt/$vfat_mnt"
         let I="$I+1"
      done
J=0
while [ $J -lt $j ]
      do
         umount "${ntfs_hd[$J]}"
         ntfs_mnt=`echo ${ntfs_hd[$J]} | awk -F/ '{print $3}' `
         mount -t ntfs -o iocharset=cp936 "${ntfs_hd[$J]}" "/mnt/$ntfs_mnt"
         let J="$J+1"
      done


坛友写的:——同上
#!/bin/sh
#
# /etc/rc.d/rc.local:      Local system initialization script.
#
# Put any local startup commands in here.      Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

#Modifild by Liony @ <www.linuxfans.org>


fc-cache -f -v
cd /usr/share/fonts/TTF
mkfontscale
cp fonts.scale fonts.dir

hd_vfat=`fdisk -l | awk '/FAT32/{print $1}'`
hd_ntfs=`fdisk -l | awk '/NTFS/{print $1}'`

i=0
for file in $hd_vfat
do
        vfat_hd=$file
        let i="$i+1"
done

j=0
for file in $hd_ntfs
do
        ntfs_hd[j]=$file
        let j="$j+1"
done
I=0
while [ $I -lt $i ]
do
        umount "${vfat_hd[$I]}"
        vfat_mnt=`echo      ${vfat_hd[$I]} | awk -F/ '{print $3}' `
        mount -t vfat -o nls=cp936 "${vfat_hd[$I]}" "/mnt/$vfat_mnt"
        let I="$I+1"
done
J=0
while [ $J -lt $j ]
do
        umount "${ntfs_hd[$J]}"
        ntfs_mnt=`echo ${ntfs_hd[$J]} | awk -F/ '{print $3}' `
        mount -t ntfs -o nls=cp936 "${ntfs_hd[$J]}" "/mnt/$ntfs_mnt"
        let J="$J+1"
done   


[ 本帖最后由 hit22 于 2008-12-30 16:35 编辑 ]
 楼主| 发表于 2008-12-30 14:33:25 | 显示全部楼层
另外偶感觉609这个版本比较诡异,比如偶用tgz2lzm到100%后要卡很久,dir2lzm也一样,lzm2dir解包比fanx2多出了一行提示.

还有飞信在fanx2缺少libcurl包依赖也可以正常用,但是609就不行。

对609有的厌倦了
回复

使用道具 举报

 楼主| 发表于 2008-12-30 16:37:35 | 显示全部楼层

已解决

找到\usr\share\locale
对比了locale.alias

发现问题了
添加
CHS.UTF-8        zh_CN.UTF-8
CHT.UTF-8        zh_TW.UTF-8

按小平的思路制作这个包,快成了。

小平编译的内核不错,正常显示fat分区中文名
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-3-29 08:13 , Processed in 0.056673 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表