mirror of
https://github.com/leitbogioro/Tools.git
synced 2024-11-15 21:54:40 +08:00
Update RHELinit.sh
This commit is contained in:
parent
db0e760508
commit
f3df03cffd
1 changed files with 2 additions and 1 deletions
|
@ -87,6 +87,7 @@ wget --no-check-certificate -qO $cloudInitFile ''$cloudInitUrl''
|
||||||
# User config.
|
# User config.
|
||||||
sed -ri 's/HostName/'${HostName}'/g' $cloudInitFile
|
sed -ri 's/HostName/'${HostName}'/g' $cloudInitFile
|
||||||
sed -ri 's/tmpWORD/'${tmpWORD}'/g' $cloudInitFile
|
sed -ri 's/tmpWORD/'${tmpWORD}'/g' $cloudInitFile
|
||||||
|
sed -ri 's/sshPORT/'${sshPORT}'/g' $cloudInitFile
|
||||||
sed -ri 's/TimeZone/'${TimeZone1}'\/'${TimeZone2}'/g' $cloudInitFile
|
sed -ri 's/TimeZone/'${TimeZone1}'\/'${TimeZone2}'/g' $cloudInitFile
|
||||||
sed -ri 's/networkAdapter/'${networkAdapter}'/g' $cloudInitFile
|
sed -ri 's/networkAdapter/'${networkAdapter}'/g' $cloudInitFile
|
||||||
if [[ "$iAddrNum" -ge "2" ]]; then
|
if [[ "$iAddrNum" -ge "2" ]]; then
|
||||||
|
@ -124,7 +125,7 @@ sed -ri 's/^#?Port.*/Port '${sshPORT}'/g' /mnt/etc/ssh/sshd_config
|
||||||
# Hack cloud init.
|
# Hack cloud init.
|
||||||
utilProgram=$(find /mnt/usr/lib/python* -name "util.py" | grep "cloudinit" | head -n 1)
|
utilProgram=$(find /mnt/usr/lib/python* -name "util.py" | grep "cloudinit" | head -n 1)
|
||||||
sed -ri 's/iso9660/osi9876/g' $utilProgram
|
sed -ri 's/iso9660/osi9876/g' $utilProgram
|
||||||
sed -ri 's/blkid/diklb/g' $utilProgram
|
sed -ri 's#"blkid"#"echo"#g' $utilProgram
|
||||||
|
|
||||||
# Umount mounted directory and loop device.
|
# Umount mounted directory and loop device.
|
||||||
umount /mnt
|
umount /mnt
|
||||||
|
|
Loading…
Reference in a new issue