mirror of
https://github.com/elseif/MikroTikPatch.git
synced 2026-09-19 23:36:20 +00:00
modified: .github/workflows/patch_v7.yml
renamed: install_routeros.sh -> setup-routeros.sh
This commit is contained in:
@@ -408,23 +408,24 @@ jobs:
|
|||||||
::sysinit:/sbin/openrc boot
|
::sysinit:/sbin/openrc boot
|
||||||
::wait:/sbin/openrc default
|
::wait:/sbin/openrc default
|
||||||
tty1::respawn:/sbin/agetty --autologin root tty1 linux
|
tty1::respawn:/sbin/agetty --autologin root tty1 linux
|
||||||
tty2::respawn:/sbin/agetty --autologin root tty2 linux
|
tty2::respawn:/sbin/agetty tty2 linux
|
||||||
tty3::respawn:/sbin/agetty --autologin root tty3 linux
|
tty3::respawn:/sbin/agetty tty3 linux
|
||||||
tty4::respawn:/sbin/agetty --autologin root tty4 linux
|
tty4::respawn:/sbin/agetty tty4 linux
|
||||||
ttyS0::respawn:/sbin/agetty --autologin root ttyS0 linux
|
ttyS0::respawn:/sbin/agetty ttyS0 linux
|
||||||
::ctrlaltdel:/sbin/reboot
|
::ctrlaltdel:/sbin/reboot
|
||||||
::shutdown:/sbin/openrc shutdown
|
::shutdown:/sbin/openrc shutdown
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cp ./install_routeros.sh $ROOTFS_DIR/root/install_routeros.sh
|
cp ./setup-routeros.sh $ROOTFS_DIR/usr/local/bin/setup-routeros
|
||||||
chmod +x $ROOTFS_DIR/root/install_routeros.sh
|
chmod +x $ROOTFS_DIR//usr/local/bin/setup-routeros
|
||||||
|
cp ./npkextract/npkextract $ROOTFS_DIR/usr/local/bin/npkextract
|
||||||
|
chmod +x $ROOTFS_DIR/usr/local/bin/npkextract
|
||||||
|
|
||||||
cat << 'EOF' > $ROOTFS_DIR/root/.zprofile
|
cat << 'EOF' > $ROOTFS_DIR/root/.zprofile
|
||||||
if [ -x /root/install_routeros.sh ]; then
|
if command -v setup-routeros >/dev/null 2>&1; then
|
||||||
/root/install_routeros.sh
|
setup-routeros
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
cp ./npkextract/npkextract $ROOTFS_DIR/bin/npkextract
|
|
||||||
chmod +x $ROOTFS_DIR/bin/npkextract
|
|
||||||
|
|
||||||
cat << 'EOF' | sudo chroot $ROOTFS_DIR /usr/bin/env PATH=/usr/bin:/bin:/usr/sbin:/sbin /bin/sh
|
cat << 'EOF' | sudo chroot $ROOTFS_DIR /usr/bin/env PATH=/usr/bin:/bin:/usr/sbin:/sbin /bin/sh
|
||||||
set -e
|
set -e
|
||||||
@@ -456,7 +457,8 @@ jobs:
|
|||||||
|
|
||||||
sed -i 's|^root:\(.*\):/bin/sh$|root:\1:/bin/zsh|' /etc/passwd
|
sed -i 's|^root:\(.*\):/bin/sh$|root:\1:/bin/zsh|' /etc/passwd
|
||||||
sed -i 's/^root:.*/root:::0:::::/' /etc/shadow
|
sed -i 's/^root:.*/root:::0:::::/' /etc/shadow
|
||||||
echo "" > /etc/motd
|
printf 'Welcome to Alpine!\n\nTo start the RouterOS installation wizard, run: setup-routeros\n\n' > /etc/motd
|
||||||
|
|
||||||
sed -i 's/^features=.*/features="ata base cdrom network scsi nvme ext2 usb virtio"/' /etc/mkinitfs/mkinitfs.conf
|
sed -i 's/^features=.*/features="ata base cdrom network scsi nvme ext2 usb virtio"/' /etc/mkinitfs/mkinitfs.conf
|
||||||
KERNEL_VERSION=$(ls /lib/modules | head -1)
|
KERNEL_VERSION=$(ls /lib/modules | head -1)
|
||||||
mkinitfs -k -t /tmp "$KERNEL_VERSION"
|
mkinitfs -k -t /tmp "$KERNEL_VERSION"
|
||||||
|
|||||||
Reference in New Issue
Block a user