[andrew@walrond.org: Another ruby-vim indent problem]

Doug Kearns dougkearns at gmail.com
Tue May 3 00:04:05 EDT 2005

----- Forwarded message from Andrew Walrond <andrew at walrond.org> -----

From: Andrew Walrond <andrew at walrond.org>
User-Agent: KMail/1.7.2
Date: Mon, 2 May 2005 22:06:15 +0100
Subject: Another ruby-vim indent problem
To: Doug Kearns <dougkearns at gmail.com>

Hi Doug

The attached file ends up way over to the right...


----- End forwarded message -----
-------------- next part --------------
# Populate the root filesystem with the basic directories and files.
# Only used during bootstrap.
def populate_fs()
	puts('Populating root filesystem')
	$root.cd {
		umask(0) {
		%w{ dev etc home include lib mnt pkg proc share sys }.each { |d| d.mkdir(0755) }
		'etc/fstab'.ftouch('#<fs>        <mountpoint>  <type>   <opts>        <backup?> <pass #>',
						   '#/dev/hda1    /             ext3     noatime          0        1',
						   '#/dev/hda2    /mnt/root2    ext3     noauto,noatime   1        2',
						   '#/dev/hda3    none          swap     sw               0        0',
						   '#/dev/hda4    /home         ext3     noatime          1        2',
						   '#/dev/hdc1    /mnt/cdrom    iso9660  noauto,ro        0        0'
						  'etc/hosts'.ftouch('# Hostname-to-address mappings for the TCP/IP subsystem',
											 '# IP address     FQDN             Alias(es)',
											 '        localhost',
											 '        heretic.local-domain'
											'etc/host.conf'.ftouch('# Resolver configuration file',
																   'order hosts,bind',
																   'multi on'
																  'etc/networks'.ftouch('# Netname-to-address mappings for the TCP/IP subsystem',
																						'# Netname  IP address',
																					   'etc/nsswitch.conf'.ftouch('passwd:         db files',
																												  'group:          db files',
																												  'shadow:         db files',
																												  'hosts:          files dns',
																												  'networks:       files dns',
																												  'protocols:      db files',
																												  'services:       db files',
																												  'ethers:         db files',
																												  'rpc:            db files',
																												  'netgroup:       db files'
																												 'etc/protocols'.ftouch('# Protocols available from the TCP/IP subsystem.',
																																		'ip      0       IP      # internet protocol, pseudo protocol number',
																																		'icmp    1       ICMP    # internet control message protocol',
																																		'igmp    2       IGMP    # internet group multicast protocol',
																																		'ggp     3       GGP     # gateway-gateway protocol',
																																		'tcp     6       TCP     # transmission control protocol',
																																		'pup     12      PUP     # PARC universal packet protocol',
																																		'udp     17      UDP     # user datagram protocol',
																																		'idp     22      IDP     # WhatsThis?',
																																		'raw     255     RAW     # RAW IP interface'
																																	   unless 'etc/services'.exists?
																																		   'etc/services'.fedit { |line|
																																			   if line =~ /(^\S+)\s+(\d+)\/(\S+)\s+(\S+|$)/
																																				   sname,sport,sencap,sdesc = $1,$2,$3,$4
																																				   line.replace "#{$1.ljust(20)} #{$2.rjust(5)}/#{$3.ljust(6)}##{$4}\n"
																																				   line.replace("#"+line) unless line[0]==?#

# Create the basic device files in /dev. Heretix uses hotplug/udev when booting normally,
# but these devices are needed during early boot, bootstrap and chroot operation.
def make_devices()
	puts('Populating /dev')
	$root.cd {
		umask(0) {
		'dev'.cd {
		%w{ shm pts input rd usb isdn cpu cpu/0 cpu/1 i2o net watchdogs dri }.each { |d| d.mkdir(0755) }

		# Load the devices file
		devices = path(HERETIXDIR,'devices').fread()

		devices.each { |line|
			next unless line =~ /(\S+)\s+(\S+)\s+(\S+)\s+(\d+)\s+(\S)\s+(\d+)\s+(\d+)/
			raise 'makedev' unless $1.exists? or system("mknod --mode #{$4} #{$1} #{$5} #{$6} #{$7}")

		}.each { |s,d| d.symlink(s) }

More information about the vim-ruby-devel mailing list