mirror of
https://github.com/MiSTer-devel/Scripts_MiSTer.git
synced 2026-05-17 03:04:34 +00:00
Version 1.0.2
Remounting / as RW only when needed; downgraded version from 1.1 to 1.0.2.
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
# You can download the latest version of this script from:
|
||||
# https://github.com/MiSTer-devel/Scripts_MiSTer
|
||||
|
||||
# Version 1.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0.2 - 2019-02-03 - Remounting / as RW only when needed; downgraded version from 1.1 to 1.0.2.
|
||||
# Version 1.0.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0 - 2019-02-02 - First commit
|
||||
|
||||
|
||||
@@ -31,10 +32,11 @@ then
|
||||
fi
|
||||
|
||||
echo "*filter"$'\n'"COMMIT" | iptables-restore
|
||||
mount / -o remount,rw
|
||||
mount | grep -q "on / .*[(,]ro[,$]" && RO_ROOT="true"
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,rw
|
||||
rm /etc/network/if-pre-up.d/iptables > /dev/null 2>&1
|
||||
sync
|
||||
mount / -o remount,ro
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,ro
|
||||
|
||||
echo "Firewall is off and"
|
||||
echo "inactive at startup."
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
# You can download the latest version of this script from:
|
||||
# https://github.com/MiSTer-devel/Scripts_MiSTer
|
||||
|
||||
# Version 1.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0.2 - 2019-02-03 - Remounting / as RW only when needed; downgraded version from 1.1 to 1.0.2.
|
||||
# Version 1.0.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0 - 2019-02-02 - First commit
|
||||
|
||||
|
||||
@@ -103,11 +104,12 @@ then
|
||||
IPTABLES_UP_RULES=$IPTABLES_UP_RULES$'\n'"COMMIT"
|
||||
echo "$IPTABLES_UP_RULES" > /media/fat/linux/iptables.up.rules
|
||||
fi
|
||||
mount / -o remount,rw
|
||||
mount | grep "on / .*[(,]ro[,$]" -q && RO_ROOT="true"
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,rw
|
||||
echo "#!/bin/bash"$'\n'"iptables-restore < /media/fat/linux/iptables.up.rules" > /etc/network/if-pre-up.d/iptables
|
||||
chmod +x /etc/network/if-pre-up.d/iptables
|
||||
sync
|
||||
mount / -o remount,ro
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,ro
|
||||
/etc/network/if-pre-up.d/iptables
|
||||
|
||||
echo "Firewall is on and"
|
||||
|
||||
10
ftp_off.sh
10
ftp_off.sh
@@ -18,7 +18,8 @@
|
||||
# You can download the latest version of this script from:
|
||||
# https://github.com/MiSTer-devel/Scripts_MiSTer
|
||||
|
||||
# Version 1.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0.2 - 2019-02-03 - Remounting / as RW only when needed; downgraded version from 1.1 to 1.0.2.
|
||||
# Version 1.0.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0 - 2019-02-02 - First commit
|
||||
|
||||
|
||||
@@ -30,11 +31,12 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/etc/init.d/S50proftpd stop
|
||||
mount / -o remount,rw
|
||||
/etc/init.d/S50proftpd stop 2> /dev/null
|
||||
mount | grep -q "on / .*[(,]ro[,$]" && RO_ROOT="true"
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,rw
|
||||
mv /etc/init.d/S50proftpd /etc/init.d/_S50proftpd > /dev/null 2>&1
|
||||
sync
|
||||
mount / -o remount,ro
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,ro
|
||||
if [ -f /media/fat/linux/iptables.up.rules ]
|
||||
then
|
||||
sed -e '/--dport 21 /s/^#*/#/g' -i /media/fat/linux/iptables.up.rules
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
# You can download the latest version of this script from:
|
||||
# https://github.com/MiSTer-devel/Scripts_MiSTer
|
||||
|
||||
# Version 1.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0.2 - 2019-02-03 - Remounting / as RW only when needed; downgraded version from 1.1 to 1.0.2.
|
||||
# Version 1.0.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0 - 2019-02-02 - First commit
|
||||
|
||||
|
||||
@@ -30,10 +31,11 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mount / -o remount,rw
|
||||
mount | grep "on / .*[(,]ro[,$]" -q && RO_ROOT="true"
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,rw
|
||||
mv /etc/init.d/_S50proftpd /etc/init.d/S50proftpd > /dev/null 2>&1
|
||||
sync
|
||||
mount / -o remount,ro
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,ro
|
||||
if [ -f /media/fat/linux/iptables.up.rules ]
|
||||
then
|
||||
sed -e '/--dport 21 /s/^#//g' -i /media/fat/linux/iptables.up.rules
|
||||
|
||||
10
samba_off.sh
10
samba_off.sh
@@ -18,7 +18,8 @@
|
||||
# You can download the latest version of this script from:
|
||||
# https://github.com/MiSTer-devel/Scripts_MiSTer
|
||||
|
||||
# Version 1.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0.2 - 2019-02-03 - Remounting / as RW only when needed; downgraded version from 1.1 to 1.0.2.
|
||||
# Version 1.0.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0 - 2019-02-02 - First commit
|
||||
|
||||
|
||||
@@ -30,11 +31,12 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/etc/init.d/S91smb stop
|
||||
mount / -o remount,rw
|
||||
/etc/init.d/S91smb stop 2> /dev/null
|
||||
mount | grep -q "on / .*[(,]ro[,$]" && RO_ROOT="true"
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,rw
|
||||
mv /etc/init.d/S91smb /etc/init.d/_S91smb > /dev/null 2>&1
|
||||
sync
|
||||
mount / -o remount,ro
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,ro
|
||||
if [ -f /media/fat/linux/iptables.up.rules ]
|
||||
then
|
||||
sed -e '/--dport 137 /s/^#*/#/g' -i /media/fat/linux/iptables.up.rules
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
# You can download the latest version of this script from:
|
||||
# https://github.com/MiSTer-devel/Scripts_MiSTer
|
||||
|
||||
# Version 1.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0.2 - 2019-02-03 - Remounting / as RW only when needed; downgraded version from 1.1 to 1.0.2.
|
||||
# Version 1.0.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0 - 2019-02-02 - First commit
|
||||
|
||||
|
||||
@@ -30,10 +31,11 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mount / -o remount,rw
|
||||
mount | grep "on / .*[(,]ro[,$]" -q && RO_ROOT="true"
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,rw
|
||||
mv /etc/init.d/_S91smb /etc/init.d/S91smb > /dev/null 2>&1
|
||||
sync
|
||||
mount / -o remount,ro
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,ro
|
||||
if [ -f /media/fat/linux/iptables.up.rules ]
|
||||
then
|
||||
sed -e '/--dport 137 /s/^#//g' -i /media/fat/linux/iptables.up.rules
|
||||
|
||||
10
ssh_off.sh
10
ssh_off.sh
@@ -18,7 +18,8 @@
|
||||
# You can download the latest version of this script from:
|
||||
# https://github.com/MiSTer-devel/Scripts_MiSTer
|
||||
|
||||
# Version 1.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0.2 - 2019-02-03 - Remounting / as RW only when needed; downgraded version from 1.1 to 1.0.2.
|
||||
# Version 1.0.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0 - 2019-02-02 - First commit
|
||||
|
||||
|
||||
@@ -30,11 +31,12 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/etc/init.d/S50sshd stop
|
||||
mount / -o remount,rw
|
||||
/etc/init.d/S50sshd stop 2> /dev/null
|
||||
mount | grep -q "on / .*[(,]ro[,$]" && RO_ROOT="true"
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,rw
|
||||
mv /etc/init.d/S50sshd /etc/init.d/_S50sshd > /dev/null 2>&1
|
||||
sync
|
||||
mount / -o remount,ro
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,ro
|
||||
if [ -f /media/fat/linux/iptables.up.rules ]
|
||||
then
|
||||
sed -e '/--dport 22 /s/^#*/#/g' -i /media/fat/linux/iptables.up.rules
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
# You can download the latest version of this script from:
|
||||
# https://github.com/MiSTer-devel/Scripts_MiSTer
|
||||
|
||||
# Version 1.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0.2 - 2019-02-03 - Remounting / as RW only when needed; downgraded version from 1.1 to 1.0.2.
|
||||
# Version 1.0.1 - 2019-02-02 - Remounting / as RW before altering /etc/init.d/ so the script actually works from OSD.
|
||||
# Version 1.0 - 2019-02-02 - First commit
|
||||
|
||||
|
||||
@@ -30,10 +31,11 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mount / -o remount,rw
|
||||
mount | grep "on / .*[(,]ro[,$]" -q && RO_ROOT="true"
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,rw
|
||||
mv /etc/init.d/_S50sshd /etc/init.d/S50sshd > /dev/null 2>&1
|
||||
sync
|
||||
mount / -o remount,ro
|
||||
[ "$RO_ROOT" == "true" ] && mount / -o remount,ro
|
||||
if [ -f /media/fat/linux/iptables.up.rules ]
|
||||
then
|
||||
sed -e '/--dport 22 /s/^#//g' -i /media/fat/linux/iptables.up.rules
|
||||
|
||||
Reference in New Issue
Block a user