Chroot: Define hostname and hosts
This commit is contained in:
		
							parent
							
								
									17a32b701d
								
							
						
					
					
						commit
						8bac33afa1
					
				|  | @ -8,6 +8,8 @@ else | |||
| 	printf '%b\n' "Please check the hard drive to use" | ||||
| 	exit 0 | ||||
| fi | ||||
| ## Computer hostname | ||||
| new_hostname="2g" | ||||
| ## Volume Group name to use for LVM | ||||
| vgname="ovhsys" | ||||
| ## If the script should manage the partitions (delete, add,…) | ||||
|  | @ -247,6 +249,11 @@ chroot /target aptitude install --assume-yes --without-recommends -- linux-image | |||
| chroot /target grub-install "${hdd}" | ||||
| chroot /target update-grub | ||||
| 
 | ||||
| ## }}} | ||||
| ## Hostname {{{ | ||||
| printf '%b\n' "${new_hostname}" > /target/etc/hostname | ||||
| printf '%b\n' "127.0.0.1       ${new_hostname}" >> /target/etc/hosts | ||||
| 
 | ||||
| ## }}} | ||||
| # }}} | ||||
| # Finish {{{ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue