mirror of
https://github.com/leitbogioro/Tools.git
synced 2025-10-21 20:56:14 +08:00
Update windowsInit.sh
This commit is contained in:
parent
e025b80a46
commit
23e2c1486d
1 changed files with 14 additions and 0 deletions
|
@ -69,3 +69,17 @@ mapperDevice=$(kpartx -av $loopDevice | grep "$loopDeviceNum" | head -n 1 | awk
|
|||
|
||||
# mount Windows dd partition to /mnt
|
||||
ntfs-3g /dev/mapper/$mapperDevice /mnt
|
||||
|
||||
# write static config script to setup step
|
||||
[[ "$Network4Config" == "isStatic" ]] && {
|
||||
mkdir -p '/mnt/Windows/Setup/Scripts/'
|
||||
wget --no-check-certificate -qO /mnt/Windows/Setup/Scripts/SetupComplete.cmd ''$windowsStaticConfigCmd''
|
||||
sed -ri "s/ipAddr/$ipAddr/g" /mnt/Windows/Setup/Scripts/SetupComplete.cmd
|
||||
sed -ri "s/actualIp4Subnet/$actualIp4Subnet/g" /mnt/Windows/Setup/Scripts/SetupComplete.cmd
|
||||
sed -ri "s/ipGate/$ipGate/g" /mnt/Windows/Setup/Scripts/SetupComplete.cmd
|
||||
sed -ri "s/ipDNS1/$ipDNS1/g" /mnt/Windows/Setup/Scripts/SetupComplete.cmd
|
||||
sed -ri "s/ipDNS2/$ipDNS2/g" /mnt/Windows/Setup/Scripts/SetupComplete.cmd
|
||||
}
|
||||
|
||||
# Reboot, the system in the memory will all be written to the hard drive.
|
||||
exec reboot
|
||||
|
|
Loading…
Add table
Reference in a new issue