All pastes #606387 Raw Edit

paldo installer: resume@SWAP@

public text v1 · immutable
·published 2007-07-06 20:32 UTC
rendered paste body
// revert live CD specific changes to the system configuration
		update_progress (adjust_ticks, "Adjusting installation");
		
		if (settings.swap_dev != null) {
			string menu_lst = "sed -i -e 's/root=cdrom rootfstype=iso9660/root=@ROOTDEV@ resume=@SWAP@/' /upkg/boot/grub/menu.lst /upkg/etc/default/grub";
		}
		else
		{
			string menu_lst = "sed -i -e 's/root=cdrom rootfstype=iso9660/root=@ROOTDEV@/' /upkg/boot/grub/menu.lst /upkg/etc/default/grub";
		}

		var adjust_cmd = new Command ("rm -rf /upkg/{.readonly,home/paldo}"
			+ " && sed -i -e '/^paldo:/d' -e 's/:paldo$/:/' /upkg/etc/{passwd,group}"
			+ " && cp /upkg/usr/share/doc/gdm/custom.conf.paldo /upkg/etc/gdm/custom.conf"
			+ " && cp /upkg/usr/share/doc/util-linux/default-fstab.paldo /upkg/etc/fstab"
			+ " && sed -i -e '/title English (Switzerland)/,//d' /upkg/boot/grub/menu.lst"
			+ " && sed " + menu_lst);
		adjust_cmd.exit += adjust_exit;
		if (!adjust_cmd.run ()) {
			display_error ("Unable to run command `%s`".printf (adjust_cmd.command_line));
			return;
		}