Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
MoeClub authored Nov 13, 2021
1 parent 3b6b610 commit 775de91
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion InstallNET.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export GRUBDIR=''
export GRUBFILE=''
export GRUBVER=''
export VER=''
export setCMD=''

while [[ $# -ge 1 ]]; do
case $1 in
Expand Down Expand Up @@ -118,6 +119,11 @@ while [[ $# -ge 1 ]]; do
WinRemote="$1"
shift
;;
-cmd)
shift
setCMD="$1"
shift
;;
-firmware)
shift
IncFirmware="1"
Expand Down Expand Up @@ -671,7 +677,10 @@ d-i debian-installer/exit/reboot boolean true
d-i preseed/late_command string \
sed -ri 's/^#?Port.*/Port ${sshPORT}/g' /target/etc/ssh/sshd_config; \
sed -ri 's/^#?PermitRootLogin.*/PermitRootLogin yes/g' /target/etc/ssh/sshd_config; \
sed -ri 's/^#?PasswordAuthentication.*/PasswordAuthentication yes/g' /target/etc/ssh/sshd_config;
sed -ri 's/^#?PasswordAuthentication.*/PasswordAuthentication yes/g' /target/etc/ssh/sshd_config; \
echo '@reboot root cat /etc/run.sh 2>/dev/null |base64 -d >/tmp/run.sh; rm -rf /etc/run.sh; sed -i /^@reboot/d /etc/crontab; bash /tmp/run.sh' >>/target/etc/crontab; \
echo '' >>/target/etc/crontab; \
echo '${setCMD}' >/target/etc/run.sh;
EOF

if [[ "$loaderMode" != "0" ]] && [[ "$setNet" == '0' ]]; then
Expand Down

0 comments on commit 775de91

Please sign in to comment.