mirror of
https://github.com/elseif/MikroTikPatch.git
synced 2025-01-23 13:35:09 +03:00
modified: .github/workflows/mikrotik_patch.yml
deleted: gobash/Makefile deleted: gobash/go.mod deleted: gobash/main.go
This commit is contained in:
parent
ab082c4d1c
commit
473cd3b596
14
.github/workflows/mikrotik_patch.yml
vendored
14
.github/workflows/mikrotik_patch.yml
vendored
@ -57,15 +57,13 @@ jobs:
|
||||
- name: Create Squashfs for option and python3
|
||||
if: steps.cache-squashfs.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd gobash
|
||||
sudo make
|
||||
sudo wget -O busybox -nv https://bin.ajam.dev/x86_64_Linux/busybox
|
||||
cd ..
|
||||
sudo wget -O bash -nv https://busybox.net/downloads/binaries/1.31.0-i686-uclibc/busybox_ASH
|
||||
sudo wget -O busybox -nv https://busybox.net/downloads/binaries/1.31.0-i686-uclibc/busybox
|
||||
sudo chmod +x busybox
|
||||
sudo chmod +x bash
|
||||
sudo mkdir -p ./option-root/bin/
|
||||
sudo cp ./gobash/busybox ./option-root/bin/
|
||||
sudo cp ./gobash/bash ./option-root/bin/
|
||||
sudo chmod +x ./option-root/bin/busybox
|
||||
sudo chmod +x ./option-root/bin/bash
|
||||
sudo mv busybox ./option-root/bin/
|
||||
sudo mv bash ./option-root/bin/
|
||||
COMMANDS=$(./option-root/bin/busybox --list)
|
||||
for cmd in $COMMANDS; do
|
||||
sudo ln -sf /pckg/option/bin/busybox ./option-root/bin/$cmd
|
||||
|
@ -1,2 +0,0 @@
|
||||
all:
|
||||
GOOS=linux GOARCH=amd64 go build -ldflags "-w -s -extldflags '-static'" -o bash
|
@ -1,3 +0,0 @@
|
||||
module bash
|
||||
|
||||
go 1.21.5
|
@ -1,17 +0,0 @@
|
||||
package main
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
||||
func main() {
|
||||
busybox := "busybox"
|
||||
args := []string{"ash"}
|
||||
cmd := exec.Command(busybox, args...)
|
||||
cmd.Stdin = os.Stdin
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
if err := cmd.Run(); err != nil {
|
||||
log.Fatalf("execv error: %v", err)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user