原始配置文件:
auto.master:
[code]#
# $Id: auto.master,v 1.3 2003/09/29 08:22:35 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#/misc /etc/auto.misc --timeout=60
#/misc /etc/auto.misc
#/net /etc/auto.net[/code]
auto.misc:
[code]#
# $Id: auto.misc,v 1.2 2003/09/29 08:22:35 raven Exp $
#
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
# the following entries are samples to pique your imagination
#linux -ro,soft,intr ftp.example.org:/pub/linux
#boot -fstype=ext2 :/dev/hda1
#floppy -fstype=auto :/dev/fd0
#floppy -fstype=ext2 :/dev/fd0
#e2floppy -fstype=ext2 :/dev/fd0
#jaz -fstype=ext2 :/dev/sdc1
#removable -fstype=ext2 :/dev/hdd[/code]
如果你挂载光盘的目录为/media/cdrom,那么配置文件应该是:
auto.master:
[code]#
# $Id: auto.master,v 1.3 2003/09/29 08:22:35 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
/media /etc/auto.misc --timeout=60 ##指向/目录下的media目录。
#/misc /etc/auto.misc
#/net /etc/auto.net[/code]
auto.misc:
[code]#
# $Id: auto.misc,v 1.2 2003/09/29 08:22:35 raven Exp $
#
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
cdrom -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom ##我的/dev/cdrom指向的是/dev/hdc,所以这里也可以写成/dev/hdc
# the following entries are samples to pique your imagination
#linux -ro,soft,intr ftp.example.org:/pub/linux
#boot -fstype=ext2 :/dev/hda1
#floppy -fstype=auto :/dev/fd0
#floppy -fstype=ext2 :/dev/fd0
#e2floppy -fstype=ext2 :/dev/fd0
#jaz -fstype=ext2 :/dev/sdc1
#removable -fstype=ext2 :/dev/hdd[/code]
如果光盘已经放入光驱,这里只需要:#service autofs start/restart就可以实现光盘挂载了。
larmbr 于 2012-05-04 15:02:51发表:
感谢分享,学习了,谢谢!!!
tan19880105 于 2012-04-09 17:49:08发表:
a
tan19880105 于 2012-04-09 17:49:06发表:
a
tan19880105 于 2012-04-09 17:49:04发表:
a
tan19880105 于 2012-04-09 17:49:03发表:
a
tan19880105 于 2012-04-09 17:49:01发表:
a
tan19880105 于 2012-04-09 17:48:59发表:
a
tan19880105 于 2012-04-09 17:48:58发表:
a
tan19880105 于 2012-04-09 17:48:56发表:
a
tan19880105 于 2012-04-09 17:48:52发表:
a
tan19880105 于 2012-04-09 17:48:50发表:
a
tan19880105 于 2012-04-09 17:48:48发表:
a
tan19880105 于 2012-04-09 17:48:44发表:
a
tan19880105 于 2012-04-09 17:48:42发表:
a
tan19880105 于 2012-04-09 17:48:41发表:
a
tan19880105 于 2012-04-09 17:48:39发表:
a
tan19880105 于 2012-04-09 17:48:38发表:
a
tan19880105 于 2012-04-09 17:48:36发表:
a
tan19880105 于 2012-04-09 17:48:35发表:
a
tan19880105 于 2012-04-09 17:48:33发表:
a
tan19880105 于 2012-04-09 17:48:31发表:
a
tan19880105 于 2012-04-09 17:48:26发表:
a
tan19880105 于 2012-04-09 17:48:25发表:
a
tan19880105 于 2012-04-09 17:48:23发表:
a
tan19880105 于 2012-04-09 17:48:21发表:
a
tan19880105 于 2012-04-09 17:48:19发表:
a
tan19880105 于 2012-04-09 17:48:17发表:
a
tan19880105 于 2012-04-09 17:48:16发表:
a
tan19880105 于 2012-04-09 17:48:14发表:
a
tan19880105 于 2012-04-09 17:48:12发表:
a
tan19880105 于 2012-04-09 17:48:09发表:
a
tan19880105 于 2012-04-09 17:48:07发表:
a
tan19880105 于 2012-04-09 17:48:05发表:
a
tan19880105 于 2012-04-09 17:48:04发表:
a
tan19880105 于 2012-04-09 17:48:02发表:
a
tan19880105 于 2012-04-09 17:48:01发表:
a
tan19880105 于 2012-04-09 17:47:59发表:
a
tan19880105 于 2012-04-09 17:47:56发表:
a
tan19880105 于 2012-04-09 17:47:54发表:
a
tan19880105 于 2012-04-09 17:47:52发表:
a