Add carriage return at each line of fstab…
This commit is contained in:
parent
19e5f007db
commit
ef1d5e6c5d
|
@ -90,46 +90,46 @@ mkswap -L sw01 -- /dev/mapper/"${vgname}"-swap
|
||||||
mkdir -p -- /target
|
mkdir -p -- /target
|
||||||
mountpoint -q /target || mount -- /dev/mapper/"${vgname}"-root /target
|
mountpoint -q /target || mount -- /dev/mapper/"${vgname}"-root /target
|
||||||
### Prepare an fstab file
|
### Prepare an fstab file
|
||||||
printf '%b' "/dev/mapper/${vgname}-root / ext4 defaults 0 0" > /tmp/target.fstab
|
printf '%b\n' "/dev/mapper/${vgname}-root / ext4 defaults 0 0" > /tmp/target.fstab
|
||||||
|
|
||||||
### boot - grub
|
### boot - grub
|
||||||
mkdir -p -- /target/boot
|
mkdir -p -- /target/boot
|
||||||
mountpoint -q /target/boot || mount -- ${hdd}1 /target/boot
|
mountpoint -q /target/boot || mount -- ${hdd}1 /target/boot
|
||||||
printf '%b' "${hdd}1 /boot ext3 defaults 0 0" >> /tmp/target.fstab
|
printf '%b\n' "${hdd}1 /boot ext3 defaults 0 0" >> /tmp/target.fstab
|
||||||
|
|
||||||
### home LV
|
### home LV
|
||||||
mkdir -p -- /target/home
|
mkdir -p -- /target/home
|
||||||
mountpoint -q /target/home || mount -- /dev/mapper/"${vgname}"-home /target/home
|
mountpoint -q /target/home || mount -- /dev/mapper/"${vgname}"-home /target/home
|
||||||
printf '%b' "/dev/mapper/${vgname}-home /home ext4 defaults 0 0" >> /tmp/target.fstab
|
printf '%b\n' "/dev/mapper/${vgname}-home /home ext4 defaults 0 0" >> /tmp/target.fstab
|
||||||
### opt LV
|
### opt LV
|
||||||
mkdir -p -- /target/opt
|
mkdir -p -- /target/opt
|
||||||
mountpoint -q /target/opt || mount -- /dev/mapper/"${vgname}"-opt /target/opt
|
mountpoint -q /target/opt || mount -- /dev/mapper/"${vgname}"-opt /target/opt
|
||||||
printf '%b' "/dev/mapper/${vgname}-opt /opt ext4 defaults 0 0" >> /tmp/target.fstab
|
printf '%b\n' "/dev/mapper/${vgname}-opt /opt ext4 defaults 0 0" >> /tmp/target.fstab
|
||||||
### srv LV
|
### srv LV
|
||||||
mkdir -p -- /target/srv
|
mkdir -p -- /target/srv
|
||||||
mountpoint -q /target/srv || mount -- /dev/mapper/"${vgname}"-srv /target/srv
|
mountpoint -q /target/srv || mount -- /dev/mapper/"${vgname}"-srv /target/srv
|
||||||
printf '%b' "/dev/mapper/${vgname}-srv /srv ext4 defaults 0 0" >> /tmp/target.fstab
|
printf '%b\n' "/dev/mapper/${vgname}-srv /srv ext4 defaults 0 0" >> /tmp/target.fstab
|
||||||
#### bkp LV
|
#### bkp LV
|
||||||
mkdir -p -- /target/srv/backup
|
mkdir -p -- /target/srv/backup
|
||||||
mountpoint -q /target/srv/backup || mount -- /dev/mapper/"${vgname}"-bkp /target/srv/backup
|
mountpoint -q /target/srv/backup || mount -- /dev/mapper/"${vgname}"-bkp /target/srv/backup
|
||||||
printf '%b' "/dev/mapper/${vgname}-bkp /srv/backup ext4 defaults 0 0" >> /tmp/target.fstab
|
printf '%b\n' "/dev/mapper/${vgname}-bkp /srv/backup ext4 defaults 0 0" >> /tmp/target.fstab
|
||||||
### tmp LV
|
### tmp LV
|
||||||
mkdir -p -- /target/tmp
|
mkdir -p -- /target/tmp
|
||||||
chmod 0777 -- /target/tmp
|
chmod 0777 -- /target/tmp
|
||||||
mountpoint -q /target/tmp || mount -- /dev/mapper/"${vgname}"-tmp /target/tmp
|
mountpoint -q /target/tmp || mount -- /dev/mapper/"${vgname}"-tmp /target/tmp
|
||||||
printf '%b' "/dev/mapper/${vgname}-tmp /tmp ext4 defaults 0 0" >> /tmp/target.fstab
|
printf '%b\n' "/dev/mapper/${vgname}-tmp /tmp ext4 defaults 0 0" >> /tmp/target.fstab
|
||||||
### usr LV
|
### usr LV
|
||||||
mkdir -p -- /target/usr
|
mkdir -p -- /target/usr
|
||||||
mountpoint -q /target/usr || mount -- /dev/mapper/"${vgname}"-usr /target/usr
|
mountpoint -q /target/usr || mount -- /dev/mapper/"${vgname}"-usr /target/usr
|
||||||
printf '%b' "/dev/mapper/${vgname}-usr /usr ext4 defaults 0 0" >> /tmp/target.fstab
|
printf '%b\n' "/dev/mapper/${vgname}-usr /usr ext4 defaults 0 0" >> /tmp/target.fstab
|
||||||
### var LV
|
### var LV
|
||||||
mkdir -p -- /target/var
|
mkdir -p -- /target/var
|
||||||
mountpoint -q /target/var || mount -- /dev/mapper/"${vgname}"-var /target/var
|
mountpoint -q /target/var || mount -- /dev/mapper/"${vgname}"-var /target/var
|
||||||
printf '%b' "/dev/mapper/${vgname}-var /var ext4 defaults 0 0" >> /tmp/target.fstab
|
printf '%b\n' "/dev/mapper/${vgname}-var /var ext4 defaults 0 0" >> /tmp/target.fstab
|
||||||
#### vz LV
|
#### vz LV
|
||||||
mkdir -p -- /target/var/lib/vz
|
mkdir -p -- /target/var/lib/vz
|
||||||
mountpoint -q /target/var/lib/vz || mount -- /dev/mapper/"${vgname}"-vz /target/var/lib/vz
|
mountpoint -q /target/var/lib/vz || mount -- /dev/mapper/"${vgname}"-vz /target/var/lib/vz
|
||||||
printf '%b' "/dev/mapper/${vgname}-vz /var/lib/vz ext4 defaults 0 0" >> /tmp/target.fstab
|
printf '%b\n' "/dev/mapper/${vgname}-vz /var/lib/vz ext4 defaults 0 0" >> /tmp/target.fstab
|
||||||
|
|
||||||
### Swap
|
### Swap
|
||||||
swapon -- /dev/mapper/"${vgname}"-swap
|
swapon -- /dev/mapper/"${vgname}"-swap
|
||||||
|
|
Loading…
Reference in New Issue