archivo a traducir del instalador

Este foro es para todo lo relacionado con la documentación, artículos de ayuda, Wikis, tips & hints y las traducciones de Arch (tanto en progreso como las finalizadas).
Responder
Avatar de Usuario
ornitorrincos
Equipo Hispano
Equipo Hispano
Mensajes: 294
Registrado: 03 Dic 2006, 08:50
Ubicación: Bilbao-Bizkaia

archivo a traducir del instalador

Mensaje por ornitorrincos » 25 Abr 2007, 14:02

con la ayuda de NachE ya tengo el archivo a traducir
de las primeras lí­neas ya me ocupo yo, aquí­ deja las lí­neas a partir de 993, como en realidad las que hay que traducir muchas menos de las que aparecen creo que basta con que una persona se encargue de todas.

Código: Seleccionar todo

dokernel() {
	if [ $SRC_READY -eq 0 ]; then
		getsource || return 1
	fi
	getdest || return 1

	local KERNTARG=
	local SRCTARG=
	#if [ "$SRC_READY" = "1" ]; then
	#	umount /src >/dev/null 2>&1
	#fi
	dialog --backtitle "$TITLE" --menu "Select a kernel you would like to use" 14 55 7 \
		"v2.6"      "Kernel 2.6.x for IDE/SCSI systems" 2>$ANSWER || return 1
	case $(cat $ANSWER) in
		"v2.6")      KERNTARG="kernel26" ;      VMLINUZ="vmlinuz26" ;;
	esac
	if [ "$KERNTARG" != "" ]; then
		prepare_pacman			
		if [ "$MODE" = "ftp" ]; then
			dodialog infobox "Downloading $KERNTARG package.  See $LOG for output." 6 55
			$PACMAN --noconfirm --root $DESTDIR --sync --downloadonly $KERNTARG >$LOG 2>&1
			if [ $? -gt 0 ]; then
				SRC_READY=0
				msg "Kernel package failed to download."
				return 1
			fi
		fi
		# mount proc/sysfs first, so mkinitrd can use auto-detection if it wants
		mount -t proc none $DESTDIR/proc
		mount -t sysfs none $DESTDIR/sys
		mount -o bind /dev $DESTDIR/dev
		doinstall $KERNTARG
		ret=$?
		umount $DESTDIR/proc $DESTDIR/sys $DESTDIR/dev
		cleanup_pacman
	fi
	if [ $ret -gt 0 ]; then
		msg "Failed to install the Linux kernel package."
		return 1
	else
		sync
		S_KERNEL=1
		msg "The kernel was successfully installed.  Make sure to install a bootloader before you reboot."
		# fallback modifications
		USE_HWDETECT_RESULTS=""
		dodialog yesno "PRECONFIGURATION?\n-----------------\n\nUse 'hwdetect' results from Configuration dialog for /etc/mkinitcpio.d/kernel26-fallback.conf. \nThis ensures consistent ordering of your hard disk controllers.\n\nIt is recommended to say 'YES' here." && USE_HWDETECT_RESULTS="yes"
		if [ "$USE_HWDETECT_RESULTS" = "yes" ]; then
			[ -n "$HWDETECTHOSTCONTROLLER" ] && sed -i -e "s/^MODULES=.*/$HWDETECTHOSTCONTROLLER/g" ${DESTDIR}/etc/mkinitcpio.d/kernel26-fallback.conf
			HWDETECTHOOK="$(echo $HWDETECTHOOKS | sed -e 's/autodetect\ //g')"
			[ -n "$HWDETECTHOOK" ] && sed -i -e "s/^HOOKS=.*/$HWDETECTHOOK/g" ${DESTDIR}/etc/mkinitcpio.d/kernel26-fallback.conf
		fi
		msg "Before rebuilding the fallback image, you must review the configuration file.  You will now be put into the editor.  After you save your changes and exit the editor, the fallback image will be rebuilt."
		[ "$EDITOR" ] || geteditor
		FALLBACK_HOOK_ERROR=""
		$EDITOR ${DESTDIR}/etc/mkinitcpio.d/kernel26-fallback.conf
		for i in $(cat ${DESTDIR}/etc/mkinitcpio.d/kernel26-fallback.conf | grep ^HOOKS | sed -e 's/"//g' -e 's/HOOKS=//g'); do 
			[ -e ${DESTDIR}/lib/initcpio/install/$i ] || FALLBACK_HOOK_ERROR=1 
		done
		if [ "$FALLBACK_HOOK_ERROR" = "1" ]; then
			dodialog msgbox "ERROR: Detected error in 'HOOKS=' line, please correct HOOKS= in /etc/mkinitcpio.d/kernel26-fallback.conf!" 18 70
		fi
		mount -t proc none $DESTDIR/proc
		mount -t sysfs none $DESTDIR/sys
		mount -o bind /dev $DESTDIR/dev
		dodialog infobox "Rebuilding fallback image. See $LOG for output." 
		chroot ${DESTDIR} /sbin/mkinitcpio -p kernel26 >$LOG 2>&1
		umount $DESTDIR/proc $DESTDIR/sys $DESTDIR/dev
	fi
	if [ -d /tmp/packages ]; then
		DO_ADDON=""
		dodialog yesno "Would you like to install your addons packages to installed system?" && DO_ADDON="yes"
		if [ "$DO_ADDON" = "yes" ] ; then
			dodialog infobox "Installing the addons packages..."
			$PACMAN --noconfirm -U --root ${DESTDIR} /tmp/packages/*
		fi
	fi
	return 0
}

donetwork() {
	INTERFACE=
	ifaces=$(ifconfig -a | egrep "Ethernet" | cut -d' ' -f1 | sed 's|$| _|g')
	if [ "$ifaces" = "" ]; then
		dodialog yesno "Cannot find any ethernet interfaces. You probably haven't loaded\nyour network module yet.  You have two options:\n\n  1) Probe for the correct module now.\n  2) Switch to another VC (ALT-F2) and load your module\n     with the modprobe command, then switch back here (ALT-F1)\n     and continue.\n\nIf you know which module you need, you should do Step 2 and\nselect NO below.  If you don't know which module you need,\nchoose Step 1 by selecting YES below.\n\nProbe for network module?" 18 70
		if [ $? -eq 0 ]; then
			probenic
	    		if [ $? -gt 0 ]; then
	      			return 1
      			fi
		fi
		ifaces=$(ifconfig -a | egrep "Ethernet" | cut -d' ' -f1 | sed 's|$| _|g')
		if [ "$ifaces" = "" ]; then
			msg "No network interfaces available."
			return 1
		fi
	fi
	while [ "$INTERFACE" = "" ]; do
		dodialog msgbox "Available Ethernet Interfaces:\n$(ifconfig -a | egrep "Ethernet" | sed 's# #_#g')\n\nIf your ethernet interface is not listed,\n1) Probe for the correct module now.\n2) Switch to another VC (ALT-F2) and load your module with\n   the modprobe command, then switch back here (ALT-F1)\n"
		dialog --backtitle "$TITLE" --extra-button --extra-label "Probe" --ok-label "Select" --menu "Select a network interface" 14 55 7 $ifaces 2>$ANSWER
		case $? in
			1) return 1 ;;
			0) INTERFACE=$(cat $ANSWER) ;;
			*) probenic ;;
		esac
		ifaces=$(ifconfig -a | egrep "Ethernet" | cut -d' ' -f1 | sed 's|$| _|g')
	done
	dodialog yesno "Do you want to use DHCP?"
	if [ $? -eq 0 ]; then
		dodialog infobox "Please wait.  Polling for DHCP server on $INTERFACE..."
		dhcpcd $INTERFACE >$LOG 2>&1 || msg "Failed to run dhcpcd." || return 1
		sleep 10
		if [ ! $(ifconfig $INTERFACE | grep 'inet addr:') ]; then
			msg "DHCP request failed." || return 1
		fi
	else
		NETPARAMETERS=""
		while [ "$NETPARAMETERS" = "" ]; do
			dodialog inputbox "Enter your IP address" 8 65 "192.168.0.2" 2>$ANSWER || return 1
			IPADDR=$(cat $ANSWER)
			dodialog inputbox "Enter your netmask" 8 65 "255.255.255.0" 2>$ANSWER || return 1
			SUBNET=$(cat $ANSWER)
			dodialog inputbox "Enter your gateway (optional)" 8 65 "192.168.0.1" 8 65 2>$ANSWER || return 1
			GW=$(cat $ANSWER)
			dodialog inputbox "Enter your DNS server IP" 8 65 "192.168.0.1" 2>$ANSWER || return 1
			DNS=$(cat $ANSWER)
			dodialog yesno "Are these settings correct?\n\nIP address:         $IPADDR\nNetmask:            $SUBNET\nGateway (optional): $GW\nDNS server:         $DNS\n"
			case $? in
				1) ;;
				0) NETPARAMETERS="1" ;;
			esac
		done
		ifconfig $INTERFACE $IPADDR netmask $SUBNET up >$LOG 2>&1 || msg "Failed to setup $INTERFACE interface." || return 1
		if [ "$GW" != "" ]; then
			route add default gw $GW >$LOG 2>&1 || msg "Failed to setup your gateway." || return 1
		fi
		echo "nameserver $DNS" >/etc/resolv.conf
	fi
	### Missing Proxy Configuration
	msg "The network is configured."
	S_NET=1
}

probenic() {
  dodialog infobox "Looking for a matching ethernet module.  Please wait..."
	printk off

  cd /lib/modules/$(uname -r)/kernel/drivers/net
	if [ $? -gt 0 ]; then
		msg "No ethernet modules were found!"
		printk on
		cd -
		return 1
	fi
  # modules with no modalias exported! status kernel 2.6.18
  NOTDETECTABLE="hp ne de4x5 wd cs89x0 eepro smc9194 seeq8005 ni52 ni65 ac3200 smc-ultra at1700 hp-plus depca eexpress 82596 de600 eth16i de620 lance ewrk3 e2100 lp486e 3c501 3c503 3c505 3c507 3c509 3c515 myri10ge"
  for mod in ${NOTDETECTABLE}; do
    modprobe $mod >/dev/null 2>&1
  done

  ifconfig -a | egrep "Ethernet" >/dev/null 2>&1
  if [ $? -gt 0 ]; then
    msg "No matching ethernet modules found."
  else
    msg "Probe succeeded.  Your network module is loaded."
  fi
  
  printk on

  cd -

}

dolilo() {
	if [ ! -f $DESTDIR/etc/lilo.conf ]; then
		msg "Error: Couldn't find $DESTDIR/etc/lilo.conf.  Is LILO installed?"
		return 1
	fi
	# Try to auto-configure LILO...
	if [ "$PART_ROOT" != "" -a "$S_LILO" != "1" ]; then
		sed -i "s|vmlinuz24|vmlinuz|g" $DESTDIR/etc/lilo.conf
		sed -i "s|vmlinuz26|vmlinuz|g" $DESTDIR/etc/lilo.conf
		sed -i "s|vmlinuz|$VMLINUZ|g" $DESTDIR/etc/lilo.conf
		#if [ "$VMLINUZ" = "vmlinuz26" -a ! "$(egrep '^[[:space:]]*+initrd' $DESTDIR/etc/lilo.conf)" ]; then
		sed -i "s|root=.*$|root=${PART_ROOT}|g" $DESTDIR/etc/lilo.conf
		#fi
	fi
	DEVS=$(finddisks _)
	DEVS="$DEVS $(findpartitions _)"
	if [ "$DEVS" = "" ]; then
		msg "No hard drives were found"
		return 1
	fi
	domenu menu "Select the boot device where the LILO bootloader will be installed (usually the MBR)" 14 55 7 $DEVS 2>$ANSWER || return 1
	ROOTDEV=$(cat $ANSWER)
	sed -i "s|boot=.*$|boot=$ROOTDEV|g" $DESTDIR/etc/lilo.conf
	msg "Before installing LILO, you must review the configuration file.  You will now be put into the editor.  After you save your changes and exit the editor, LILO will be installed."
	[ "$EDITOR" ] || geteditor
	$EDITOR ${DESTDIR}/etc/lilo.conf
	dodialog infobox "Installing the LILO bootloader..."
	mount -t proc none $DESTDIR/proc
	mount -o bind /dev $DESTDIR/dev
	chroot $DESTDIR /sbin/lilo >$LOG 2>&1
	if [ $? -gt 0 ]; then
		umount $DESTDIR/dev $DESTDIR/proc
		msg "Error installing LILO. (see $LOG for output)"
		return 1
	fi
	umount $DESTDIR/dev $DESTDIR/proc
	msg "LILO was successfully installed."
	S_LILO=1
}

dogrub() {
	get_grub_map	
	if [ ! -f $DESTDIR/boot/grub/menu.lst ]; then
		msg "Error: Couldn't find $DESTDIR/boot/grub/menu.lst.  Is GRUB installed?"
		return 1
	fi
	# try to auto-configure GRUB...
	if [ "$PART_ROOT" != "" -a "$S_GRUB" != "1" ]; then
		grubdev=$(mapdev $PART_ROOT)
		# look for a separately-mounted /boot partition
		bootdev=$(mount | grep $DESTDIR/boot | cut -d' ' -f 1)
		if [ "$grubdev" != "" -o "$bootdev" != "" ]; then
			cp $DESTDIR/boot/grub/menu.lst /tmp/.menu.lst
			# remove the default entries by truncating the file at our little tag (#-*)
			head -n $(cat /tmp/.menu.lst | grep -n '#-\*' | cut -d: -f 1) /tmp/.menu.lst >$DESTDIR/boot/grub/menu.lst
			rm -f /tmp/.menu.lst
			echo "" >>$DESTDIR/boot/grub/menu.lst
			echo "# (0) Arch Linux" >>$DESTDIR/boot/grub/menu.lst
			echo "title  Arch Linux" >>$DESTDIR/boot/grub/menu.lst
			subdir=
			if [ "$bootdev" != "" ]; then
				grubdev=$(mapdev $bootdev)
			else
				subdir="/boot"
			fi
			echo "root   $grubdev" >>$DESTDIR/boot/grub/menu.lst
			echo "kernel $subdir/$VMLINUZ root=$PART_ROOT ro" >>$DESTDIR/boot/grub/menu.lst
			if [ "$VMLINUZ" = "vmlinuz26" ]; then
				echo "initrd $subdir/kernel26.img" >>$DESTDIR/boot/grub/menu.lst
			fi
			echo "" >>$DESTDIR/boot/grub/menu.lst
			# adding fallback/full image
			echo "# (1) Arch Linux" >>$DESTDIR/boot/grub/menu.lst
			echo "title  Arch Linux Fallback" >>$DESTDIR/boot/grub/menu.lst
			echo "root   $grubdev" >>$DESTDIR/boot/grub/menu.lst
			echo "kernel $subdir/$VMLINUZ root=$PART_ROOT ro" >>$DESTDIR/boot/grub/menu.lst
			if [ "$VMLINUZ" = "vmlinuz26" ]; then
				echo "initrd $subdir/kernel26-fallback.img" >>$DESTDIR/boot/grub/menu.lst
			fi
			echo "" >>$DESTDIR/boot/grub/menu.lst
			echo "# (1) Windows" >>$DESTDIR/boot/grub/menu.lst
			echo "#title Windows" >>$DESTDIR/boot/grub/menu.lst
			echo "#rootnoverify (hd0,0)" >>$DESTDIR/boot/grub/menu.lst
			echo "#makeactive" >>$DESTDIR/boot/grub/menu.lst
			echo "#chainloader +1" >>$DESTDIR/boot/grub/menu.lst
		fi
	fi

	msg "Before installing GRUB, you must review the configuration file.  You will now be put into the editor.  After you save your changes and exit the editor, you can install GRUB."
	[ "$EDITOR" ] || geteditor
	$EDITOR ${DESTDIR}/boot/grub/menu.lst

	DEVS=$(finddisks _)
	DEVS="$DEVS $(findpartitions _)"
	if [ "$DEVS" = "" ]; then
		msg "No hard drives were found"
		return 1
	fi
	domenu menu "Select the boot device where the GRUB bootloader will be installed (usually the MBR)" 14 55 7 $DEVS 2>$ANSWER || return 1
	ROOTDEV=$(cat $ANSWER)
	dodialog infobox "Installing the GRUB bootloader..."
	cp -a $DESTDIR/usr/lib/grub/i386-pc/* $DESTDIR/boot/grub/
	sync
	# freeze xfs filesystems to enable grub installation on xfs filesystems
	if [ -x /usr/sbin/xfs_freeze ]; then
		/usr/sbin/xfs_freeze -f /boot > /dev/null 2>&1
		/usr/sbin/xfs_freeze -f / > /dev/null 2>&1
	fi
	# look for a separately-mounted /boot partition
	bootpart=$(mount | grep $DESTDIR/boot | cut -d' ' -f 1)
	if [ "$bootpart" = "" ]; then
		if [ "$PART_ROOT" = "" ]; then
			dodialog inputbox "Enter the full path to your root device" 8 65 "/dev/sda3" 2>$ANSWER || return 1
			bootpart=$(cat $ANSWER)
		else
			bootpart=$PART_ROOT
		fi
	fi
	bootpart=$(mapdev $bootpart)
	bootdev=$(mapdev $ROOTDEV)
	if [ "$bootpart" = "" ]; then
		msg "Error: Missing/Invalid root device: $bootpart"
		return 1
	fi
	$DESTDIR/sbin/grub --no-floppy --batch >/tmp/grub.log 2>&1 <<EOF
root $bootpart
setup $bootdev
quit
EOF
	cat /tmp/grub.log >$LOG
	# unfreeze xfs filesystems
	if [ -x /usr/sbin/xfs_freeze ]; then
		/usr/sbin/xfs_freeze -u /boot > /dev/null 2>&1
		/usr/sbin/xfs_freeze -u / > /dev/null 2>&1
	fi

	if grep "Error [0-9]*: " /tmp/grub.log >/dev/null; then
		msg "Error installing GRUB. (see $LOG for output)"
		return 1
	fi
	msg "GRUB was successfully installed."
	S_GRUB=1
}

mainmenu() {
	if [ -n "$S_NEXTITEM" ]; then
		DEFAULT="--default-item $S_NEXTITEM"
	else
		DEFAULT=""
	fi
	if [ "$MODE" = "ftp" ]; then
		dialog $DEFAULT --backtitle "$TITLE" --title " MAIN MENU " \
			--menu "Use the UP and DOWN arrows to navigate menus.  Use TAB to switch between buttons and ENTER to select." 15 55 8 \
			"0" "Configure Network" \
			"1" "Prepare Hard Drive" \
			"2" "Select Packages" \
			"3" "Install Packages" \
			"4" "Configure System" \
			"5" "Install Kernel" \
			"6" "Install Bootloader" \
			"7" "Exit Install" 2>$ANSWER
	else
		dialog $DEFAULT --backtitle "$TITLE" --title " MAIN MENU " \
			--menu "Use the UP and DOWN arrows to navigate menus.  Use TAB to switch between buttons and ENTER to select." 15 55 8 \
			"1" "Prepare Hard Drive" \
			"2" "Select Packages" \
			"3" "Install Packages" \
			"4" "Configure System" \
			"5" "Install Kernel" \
			"6" "Install Bootloader" \
			"7" "Exit Install" 2>$ANSWER
	fi
	S_NEXTITEM="$(cat $ANSWER)"
	case $(cat $ANSWER) in
		"0")
			donetwork ;;
		"1")
			S_MKFSAUTO=0
			S_MKFS=0
			DONE=0
			S_NEXTITEM=""
			while [ "$DONE" = "0" ]; do
				if [ -n "$S_NEXTITEM" ]; then
					DEFAULT="--default-item $S_NEXTITEM"
				else
					DEFAULT=""
				fi
				dialog $DEFAULT --backtitle "$TITLE" --menu "Prepare Hard Drive" 12 60 5 \
					"1" "Auto-Prepare (erases the ENTIRE hard drive)" \
					"2" "Partition Hard Drives" \
					"3" "Set Filesystem Mountpoints" \
					"4" "Return to Main Menu" 2>$ANSWER
				S_NEXTITEM="$(cat $ANSWER)"
				case $(cat $ANSWER) in
					"1")
						DISCS=$(finddisks)
						if [ $(echo $DISCS | wc -w) -gt 1 ]; then
							dodialog msgbox "Available Disks:\n\n$(for i in $(finddisks); do dmesg | grep $(echo $i | sed 's#/dev/##g') | grep sectors | sort -u | cut -d')' -f1 |sed -e 's/ /|/g' -e 's/SCSI|device|//g' -e 's/(//g'; done)\n"
							domenu menu "Select the hard drive to use" 14 55 7 $(finddisks _) 2>$ANSWER || return 1
							DISC=$(cat $ANSWER)
						else
							DISC=$DISCS
						fi
							SET_DEFAULTFS=""
							while [ "$SET_DEFAULTFS" = "" ]; do
								FSOPTS="ext2 Ext2 ext3 Ext3"
								[ "$(which mkreiserfs)" ] && FSOPTS="$FSOPTS reiserfs Reiser3"
								[ "$(which mkfs.xfs)" ]   && FSOPTS="$FSOPTS xfs XFS"
								[ "$(which mkfs.jfs)" ]   && FSOPTS="$FSOPTS jfs JFS"
								dodialog inputbox "Enter the size (MegaByte/MB) of your /boot partition" 8 65 "32" 2>$ANSWER || return 1
								BOOT_PART_SIZE="$(cat $ANSWER)"
								dodialog inputbox "Enter the size (MegaByte/MB) of your swap partition" 8 65 "256" 2>$ANSWER || return 1
								SWAP_PART_SIZE=$(cat $ANSWER)
								dodialog inputbox "Enter the size (MegaByte/MB) of your / partition,\n the /home partition will take all the left space." 8 65 "7500" 2>$ANSWER || return 1
								ROOT_PART_SIZE=$(cat $ANSWER)
								domenu menu "Select a filesystem for / and /home" 13 45 6 $FSOPTS 2>$ANSWER || return 1
								FSTYPE=$(cat $ANSWER)
								REAL_DEFAULTFS=$(echo $DEFAULTFS | sed -e "s|/:7500:ext3|/:$ROOT_PART_SIZE:$FSTYPE|g" -e "s|/home:\*:ext3|/home:\*:$FSTYPE|g" -e "s|swap:256|swap:$SWAP_PART_SIZE|g" -e "s|/boot:32|/boot:$BOOT_PART_SIZE|g")
								dodialog yesno "$FSTYPE will be used for / and /home?" "" "" && SET_DEFAULTFS=1
							done
						dodialog yesno "$DISC will be COMPLETELY ERASED!  Are you absolutely sure?" "" "" "default=no" \
							&& mksimplefs $DISC "$REAL_DEFAULTFS" ;;
					"2")
						partition ;;
					"3")
						PARTFINISH=""
						mountpoints ;;
					*)
						DONE=1 ;;
				esac
			done
			S_NEXTITEM="1" ;;
		"2")
			selectpkg ;;
		"3")
			installpkg ;;
		"4")
			HWDETECT=""
			HWPARAMETER=""
			DSDT_ENABLE=""
			dodialog yesno "PRECONFIGURATION?\n-----------------\n\nUse 'hwdetect' for '/etc/rc.conf' and '/etc/mkinitcpio.conf'. \nThis ensures consistent ordering of your hard disk controllers and network devices.\n\nIt is recommended to say 'YES' here." && HWDETECT="yes"
			if [ "$HWDETECT" = "yes" ]; then
				if /usr/bin/vmware-detect; then 
					HWPARAMETER="$HWPARAMETER --vmware"
				fi
				grep -qw ide-legacy /proc/cmdline && HWPARAMETER="$HWPARAMETER --ide-legacy"
				dodialog yesno "Do you need support for booting from usb devices?" "" "" default=no && HWPARAMETER="$HWPARAMETER --usb"
				dodialog yesno "Do you need support for booting from firewire devices?" "" "" default=no && HWPARAMETER="$HWPARAMETER --fw"
				dodialog yesno "Do you need support for booting from pcmcia devices?" "" "" default=no && HWPARAMETER="$HWPARAMETER --pcmcia"
				dodialog yesno "Do you need support for booting from nfs shares?" "" "" default=no && HWPARAMETER="$HWPARAMETER --nfs"
				dodialog yesno "Do you need support for booting from software raid arrays?" "" "" default=no  && HWPARAMETER="$HWPARAMETER --raid"
				if [ -e $DESTDIR/lib/initcpio/hooks/raid-partitions ]; then
					dodialog yesno "Do you need support for booting from software raid mdp/partition arrays?" "" "" default=no  && HWPARAMETER="$HWPARAMETER --raid-partitions"
				fi
				dodialog yesno "Do you need support for booting from lvm2 volumes?" "" "" default=no && HWPARAMETER="$HWPARAMETER --lvm2"
				dodialog yesno "Do you need support for booting from encrypted volumes?" "" "" default=no && HWPARAMETER="$HWPARAMETER --encrypt"
				dodialog yesno "Do you need support for booting the kernel with a custom DSDT file?" "" "" default=no && DSDT_ENABLE=1
				if [ "$DSDT_ENABLE" = "1" ]; then
					while [ "$DSDT" = "" ]; do
						dodialog inputbox "Enter the custom DSDT file (with full path)" 8 65 "" 2>$ANSWER || return 1
						DSDT=$(cat $ANSWER)
						if [ -s "$DSDT" ]; then		
							cp $DSDT $DESTDIR/lib/initcpio/custom.dsdt
							HWPARAMETER="$HWPARAMETER --dsdt"
						else
							dodialog msgbox "ERROR: You have entered a wrong file name, please enter again."
							DSDT=""
						fi
					done
				fi
				# add always keymap
				HWPARAMETER="$HWPARAMETER --keymap"
				HWDETECTHOSTCONTROLLER=""
				HWDETECTHOOKS=""
				HWDETECTNET=""
				HWDETECTHOSTCONTROLLER="$(hwdetect --hostcontroller $HWPARAMETER)"
				HWDETECTHOOKS="$(hwdetect --hooks-dir=$DESTDIR/lib/initcpio/install --hooks $HWPARAMETER)"
				HWDETECTNET="$(hwdetect --net $HWPARAMETER)"
				[ -n "$HWDETECTHOSTCONTROLLER" ] && sed -i -e "s/^MODULES=.*/$HWDETECTHOSTCONTROLLER/g" ${DESTDIR}/etc/mkinitcpio.conf
				[ -n "$HWDETECTHOOKS" ] && sed -i -e "s/^HOOKS=.*/$HWDETECTHOOKS/g" ${DESTDIR}/etc/mkinitcpio.conf
				[ -n "$HWDETECTNET" ] && sed -i -e "s/^MODULES=.*/$HWDETECTNET/g" ${DESTDIR}/etc/rc.conf
			fi
			if [ -s /tmp/.keymap ]; then
				dodialog yesno "Do you want to use the keymap: $(cat /tmp/.keymap | sed -e 's/\..*//g') in rc.conf?" "" "" && sed -i -e "s/^KEYMAP=.*/KEYMAP=$(cat /tmp/.keymap | sed -e 's/\..*//g')/g" ${DESTDIR}/etc/rc.conf
			fi
			if [ -s /tmp/.font ]; then
				dodialog yesno "Do you want to use the consolefont: $(cat /tmp/.font | sed -e 's/\..*//g') in rc.conf?" "" "" && sed -i -e "s/^CONSOLEFONT=.*/CONSOLEFONT=$(cat /tmp/.font | sed -e 's/\..*//g')/g" ${DESTDIR}/etc/rc.conf
			fi
			[ "$EDITOR" ] || geteditor
			DONE=0
			FILE=""
			while [ "$EDITOR" != "" -a "$DONE" = "0" ]; do
				if [ -n "$FILE" ]; then
					DEFAULT="--default-item $FILE"
				else
					DEFAULT=""
				fi
				dialog $DEFAULT --backtitle "$TITLE" --menu "Configuration" 17 60 10 \
					"/etc/rc.conf" "System Config" \
					"/etc/hosts" "Network Hosts" \
					"/etc/fstab" "Filesystem Mountpoints" \
					"/etc/mkinitcpio.conf" "Initramfs Config" \
					"/etc/modprobe.conf" "Kernel Modules (for 2.6.x)" \
					"/etc/resolv.conf" "DNS Servers" \
					 "/etc/locale.gen" "Glibc Locales" \
					"Root-Password" "Set the root password" \
					"_" "Return to Main Menu" 2>$ANSWER
				FILE=$(cat $ANSWER)

				if [ "$FILE" = "_" -o "$FILE" = "" ]; then
					DONE=1
				else
					if [ "$FILE" = "/etc/mkinitcpio.conf" ]; then
						dodialog msgbox "The mkinitcpio.conf file controls which modules will be placed into the initramfs for your system's kernel.\n\n- Non US keymap users should add 'keymap' to HOOKS= array\n- USB keyboard users should add 'usbinput' to HOOKS= array\n- If you install under VMWARE add 'BusLogic' to MODULES= array\n- raid, lvm2, encrypt are not enabled by default\n- 2 or more disk controllers, please specify the correct module\n  loading order in MODULES= array \n\nMost of you will not need to change anything in this file.\n\nNOTE: Any changes to this file should be made BEFORE you select Install Kernel." 18 70
						HOOK_ERROR=""
					fi
					if ! [ "$FILE" = "Root-Password" ]; then
						$EDITOR ${DESTDIR}${FILE}
					else
						ROOTPW=""
						while [ "$ROOTPW" = "" ]; do
						chroot ${DESTDIR} passwd root && ROOTPW=1
						done
					fi
					if [ "$FILE" = "/etc/locale.gen" ]; then
						chroot ${DESTDIR} locale-gen
					fi
					if [ "$FILE" = "/etc/mkinitcpio.conf" ]; then
						for i in $(cat ${DESTDIR}/etc/mkinitcpio.conf | grep ^HOOKS | sed -e 's/"//g' -e 's/HOOKS=//g'); do 
							[ -e ${DESTDIR}/lib/initcpio/install/$i ] || HOOK_ERROR=1 
						done
						if [ "$HOOK_ERROR" = "1" ]; then
							dodialog msgbox "ERROR: Detected error in 'HOOKS=' line, please correct HOOKS= in /etc/mkinitcpio.conf!" 18 70
						fi
					fi
					if [ "$FILE" = "/etc/rc.conf" ]; then
						TIMEZONE=""
						eval $(grep "^TIMEZONE" ${DESTDIR}/etc/rc.conf)
						if [ "$TIMEZONE" != "" -a -e ${DESTDIR}/usr/share/zoneinfo/$TIMEZONE ]; then
							cp ${DESTDIR}/usr/share/zoneinfo/$TIMEZONE ${DESTDIR}/etc/localtime
							cp ${DESTDIR}/usr/share/zoneinfo/$TIMEZONE /etc/localtime
						fi
						if [ ! -f ${DESTDIR}/var/lib/hwclock/adjtime ]; then
								echo "0.0 0 0.0" > ${DESTDIR}/var/lib/hwclock/adjtime
						fi
						eval $(grep "^HARDWARECLOCK" ${DESTDIR}/etc/rc.conf)
						if [ "$HARDWARECLOCK" = "UTC" ]; then
							chroot ${DESTDIR} /sbin/hwclock --directisa --utc --hctosys
						else
							chroot ${DESTDIR} /sbin/hwclock --directisa --localtime --hctosys
						fi
						# ugly hack:
						for line in $(sort --reverse -t: -k3 /tmp/.parts); do
							PART=$(echo $line | cut -d: -f 1)
							FSTYPE=$(echo $line | cut -d: -f 2)
							MP=$(echo $line | cut -d: -f 3)
							if [ "$MP" != "swap" ]; then
								umount ${DESTDIR}${MP}
							fi
						done
						for line in $(sort -t: -k3 /tmp/.parts); do
							PART=$(echo $line | cut -d: -f 1)
							FSTYPE=$(echo $line | cut -d: -f 2)
							MP=$(echo $line | cut -d: -f 3)
							if [ "$MP" != "swap" ]; then
							mount -t ${FSTYPE} ${PART} ${DESTDIR}${MP}
							fi
						done
						# end of hack
					fi
				fi
			done ;;
		"5")
			dokernel ;;
		"6")
			dialog --backtitle "$TITLE" --menu "Which bootloader would you like to use?  Grub is the Arch default.\n\n" \
				10 55 2 \
				"GRUB" "Use the GRUB bootloader (default)" \
				"LILO" "Use the LILO bootloader" 2>$ANSWER
			case $(cat $ANSWER) in
				"GRUB") dogrub ;;
				"LILO") dolilo ;;
			esac
			;;
		"7")
			if [ "$SRC_READY" = "1" -a "$MODE" = "cd" ]; then
				umount /src >/dev/null 2>&1
			fi
			echo ""
			echo "If the install finished successfully, you can now type 'reboot'"
			echo "to restart the system."
			echo ""
			exit 0 ;;
		*)
			abort ;;
	esac
}

dodialog msgbox "Welcome to the Arch Linux Installation program.  The install process is fairly straightforward, and you should run through the options in the order they are presented.  If you are unfamiliar with partitioning/making filesystems, you may want to consult some documentation before continuing.  You can view all output from commands by viewing your VC5 console (ALT-F5).  ALT-F1 will bring you back here." 14 65

dialog --backtitle "$TITLE" --menu "Please select an installation source" 10 35 3 \
"1" "CD-ROM or OTHER SOURCE" \
"2" "FTP" 2>$ANSWER || abort
case $(cat $ANSWER) in
	"1")
		MODE="cd"
		;;
	"2")
		MODE="ftp"
		;;
esac 

if [ "$MODE" = "cd" ]; then
	TITLE="Arch Linux CDROM or OTHER SOURCE Installation"
else
	TITLE="Arch Linux FTP Installation"
	dodialog msgbox "If you wish to load your ethernet modules manually, please do so now (consoles 1 thru 4 are active)." 12 65
fi

loop() {
	while $(/bin/true); do
		mainmenu
	done
}

loop

exit 0
el que lo vaya a traducir que avise aquí­.
aviso que hay que tener algo de conocimientos de bash(muy básicos) y ayuda un editor que resalte la sintaxis, ya que hay veces que algo en inglés no parece estar para traducir, yo en esos casos lo dejo como está y al hacer una instalación de pruebas ya se verá si habí­a que traducirlo o no.

EDITO: como he terminado mis lineas y parece que nadie se apunta empiezo a traducir estas.

PD: NachE, al final encontré cómo descomprimir el archivo
cpio -idv --no-absolute-filenames < ./initrd.cpio
Cualquier idiota puede hacer las cosas más grandes y más complejas. Pero necesita un toque de genialidad, y mucho valor, ir en la dirección contraria. E. F. Schumacher

Avatar de Usuario
ornitorrincos
Equipo Hispano
Equipo Hispano
Mensajes: 294
Registrado: 03 Dic 2006, 08:50
Ubicación: Bilbao-Bizkaia

Mensaje por ornitorrincos » 30 Abr 2007, 13:39

bueno, como me falta un poco de tiempo luuuciano me está ayudando con la última parte.
Cualquier idiota puede hacer las cosas más grandes y más complejas. Pero necesita un toque de genialidad, y mucho valor, ir en la dirección contraria. E. F. Schumacher

Responder