mirror of
https://github.com/AuxXxilium/arc-patches.git
synced 2024-11-23 23:00:55 +07:00
Merge pull request #1 from AuxXxilium/dev
add linux live patch function
This commit is contained in:
commit
a7c86d0d8a
@ -1,8 +0,0 @@
|
||||
--- a/etc/passwd
|
||||
+++ b/etc/passwd
|
||||
@@ -1,4 +1,4 @@
|
||||
-root:x:0:0::/root:/bin/ash
|
||||
+root::0:0::/root:/bin/ash
|
||||
system:x:1:1::/usr/syno/synoman:/usr/bin/nologin
|
||||
daemon:x:2:2::/:/bin/sh
|
||||
SYSTEM_ADMIN:x:3:101::/nonexist:/usr/bin/nologin
|
@ -1,39 +0,0 @@
|
||||
--- a/linuxrc.syno.impl
|
||||
+++ b/linuxrc.syno.impl
|
||||
@@ -51,6 +51,10 @@
|
||||
UnknownSynoPartitionMigrationFlag="/.unknown_syno_partition_migrate"
|
||||
IncompatibleRootDevice="/.incompatible_root_device"
|
||||
|
||||
+set -x
|
||||
+insmod /usr/lib/modules/rp.ko
|
||||
+/addons/addons.sh early
|
||||
+
|
||||
UmountRoot()
|
||||
{
|
||||
grep "^${RootDevice}" /proc/mounts && /bin/umount -f ${Mnt}
|
||||
@@ -67,6 +69,8 @@
|
||||
# show date for login info
|
||||
date
|
||||
|
||||
+ rmmod rp
|
||||
+ /addons/addons.sh jrExit
|
||||
UmountRoot
|
||||
|
||||
exit $1
|
||||
@@ -176,6 +179,8 @@
|
||||
echo "Insert basic USB modules..."
|
||||
SYNOLoadModules $USB_MODULES
|
||||
+
|
||||
+/addons/addons.sh modules
|
||||
|
||||
# insert Etron USB3.0 drivers
|
||||
|
||||
if [ $KERNEL_VCODE -ge "$(KernelVersionCode "3.10")" ]; then
|
||||
@@ -224,6 +229,7 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
+/addons/addons.sh patches
|
||||
LoadBrmModules
|
||||
|
||||
####################################################
|
@ -8,4 +8,4 @@
|
||||
+DisabledPortDisks=""
|
||||
partition=`/usr/syno/bin/synodiskport -installable_disk_list`
|
||||
|
||||
product=`/bin/get_key_value /etc.defaults/synoinfo.conf product`
|
||||
product=`/bin/get_key_value /etc.defaults/synoinfo.conf product`
|
@ -8,4 +8,4 @@
|
||||
+DisabledPortDisks=""
|
||||
partition="$(/usr/syno/bin/synodiskport -installable_disk_list)"
|
||||
|
||||
upnpmodelname="$(/bin/get_key_value /etc.defaults/synoinfo.conf upnpmodelname)"
|
||||
upnpmodelname="$(/bin/get_key_value /etc.defaults/synoinfo.conf upnpmodelname)"
|
@ -5,4 +5,4 @@
|
||||
+root::0:0::/root:/bin/ash
|
||||
system:x:1:1::/usr/syno/synoman:/usr/bin/nologin
|
||||
daemon:x:2:2::/:/bin/sh
|
||||
lp:x:7:7::/var/spool/lpd:/bin/sh
|
||||
lp:x:7:7::/var/spool/lpd:/bin/sh
|
@ -5,4 +5,4 @@
|
||||
+root::0:0::/root:/bin/ash
|
||||
system:x:1:1::/usr/syno/synoman:/usr/bin/nologin
|
||||
daemon:x:2:2::/:/bin/sh
|
||||
SYSTEM_ADMIN:x:3:101::/nonexist:/usr/bin/nologin
|
||||
SYSTEM_ADMIN:x:3:101::/nonexist:/usr/bin/nologin
|
@ -6,4 +6,4 @@
|
||||
echo "=============================="
|
||||
-
|
||||
+/addons/addons.sh rcExit
|
||||
exit 0
|
||||
exit 0
|
@ -34,4 +34,4 @@
|
||||
+
|
||||
if [ "$SupportDualhead" = "yes" ]; then
|
||||
# Run HA script
|
||||
/etc.defaults/AHAtasks check_stage
|
||||
/etc.defaults/AHAtasks check_stage
|
@ -1,5 +1,5 @@
|
||||
--- a/linuxrc.syno.impl
|
||||
+++ b/linuxrc.syno.impl
|
||||
--- a/linuxrc.syno
|
||||
+++ b/linuxrc.syno
|
||||
@@ -51,6 +51,8 @@
|
||||
UnknownSynoPartitionMigrationFlag="/.unknown_syno_partition_migrate"
|
||||
IncompatibleRootDevice="/.incompatible_root_device"
|
||||
@ -9,28 +9,31 @@
|
||||
UmountRoot()
|
||||
{
|
||||
grep "^${RootDevice}" /proc/mounts && /bin/umount -f ${Mnt}
|
||||
@@ -67,6 +69,7 @@
|
||||
# show date for login info
|
||||
date
|
||||
|
||||
@@ -73,6 +75,9 @@
|
||||
if [ "$SupportDualhead" = "yes" ]; then
|
||||
/etc.defaults/AHAtasks stage_change_end
|
||||
fi
|
||||
+
|
||||
+ /addons/addons.sh jrExit
|
||||
+
|
||||
UmountRoot
|
||||
|
||||
exit $1
|
||||
@@ -176,6 +179,8 @@
|
||||
}
|
||||
@@ -154,6 +159,8 @@
|
||||
echo "Insert basic USB modules..."
|
||||
SYNOLoadModules $USB_MODULES
|
||||
+
|
||||
|
||||
+/addons/addons.sh modules
|
||||
|
||||
+
|
||||
# insert Etron USB3.0 drivers
|
||||
|
||||
if [ $KERNEL_VCODE -ge "$(KernelVersionCode "3.10")" ]; then
|
||||
@@ -224,6 +229,7 @@
|
||||
if [ $KERNEL_VCODE -ge $(KernelVersionCode "3.10") ]; then
|
||||
@@ -206,6 +213,8 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
+/addons/addons.sh patches
|
||||
LoadBrmModules
|
||||
|
||||
####################################################
|
||||
+
|
||||
if [ "$SupportDualhead" = "yes" ]; then
|
||||
# Run HA script
|
||||
/etc.defaults/AHAtasks check_stage
|
@ -33,4 +33,4 @@
|
||||
+/addons/addons.sh patches
|
||||
LoadBrmModules
|
||||
|
||||
####################################################
|
||||
####################################################
|
@ -1,10 +1,9 @@
|
||||
--- a/linuxrc.syno.impl
|
||||
+++ b/linuxrc.syno.impl
|
||||
@@ -49,6 +49,10 @@
|
||||
@@ -49,6 +49,9 @@
|
||||
UnknownSynoPartitionMigrationFlag="/.unknown_syno_partition_migrate"
|
||||
IncompatibleRootDevice="/.incompatible_root_device"
|
||||
|
||||
+set -x
|
||||
+insmod /usr/lib/modules/rp.ko
|
||||
+/addons/addons.sh early
|
||||
+
|
||||
@ -37,4 +36,4 @@
|
||||
+
|
||||
if [ "$SupportDualhead" = "yes" ]; then
|
||||
# Run HA script
|
||||
/etc.defaults/AHAtasks check_stage
|
||||
/etc.defaults/AHAtasks check_stage
|
@ -1,10 +1,9 @@
|
||||
--- a/linuxrc.syno.impl
|
||||
+++ b/linuxrc.syno.impl
|
||||
@@ -51,6 +51,10 @@
|
||||
@@ -51,6 +51,9 @@
|
||||
UnknownSynoPartitionMigrationFlag="/.unknown_syno_partition_migrate"
|
||||
IncompatibleRootDevice="/.incompatible_root_device"
|
||||
|
||||
+set -x
|
||||
+insmod /usr/lib/modules/rp.ko
|
||||
+/addons/addons.sh early
|
||||
+
|
||||
@ -23,17 +22,18 @@
|
||||
@@ -176,6 +179,8 @@
|
||||
echo "Insert basic USB modules..."
|
||||
SYNOLoadModules $USB_MODULES
|
||||
+
|
||||
|
||||
+/addons/addons.sh modules
|
||||
|
||||
+
|
||||
# insert Etron USB3.0 drivers
|
||||
|
||||
if [ $KERNEL_VCODE -ge "$(KernelVersionCode "3.10")" ]; then
|
||||
@@ -224,6 +229,7 @@
|
||||
@@ -224,6 +229,8 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
+/addons/addons.sh patches
|
||||
+
|
||||
LoadBrmModules
|
||||
|
||||
####################################################
|
||||
####################################################
|
@ -5,4 +5,4 @@
|
||||
127.0.0.1 localhost
|
||||
::1 localhost
|
||||
+127.0.0.1 update7.synology.com
|
||||
+127.0.0.1 dataupdate7.synology.com
|
||||
+127.0.0.1 dataupdate7.synology.com
|
@ -29,4 +29,4 @@
|
||||
+
|
||||
Mkdir -p /tmpRoot/initrd
|
||||
|
||||
Umount /proc >/dev/null 2>&1
|
||||
Umount /proc >/dev/null 2>&1
|
32
ramdisk-post-init-script-25556.patch
Normal file
32
ramdisk-post-init-script-25556.patch
Normal file
@ -0,0 +1,32 @@
|
||||
--- a/usr/sbin/init.post
|
||||
+++ b/usr/sbin/init.post
|
||||
@@ -18,6 +18,29 @@
|
||||
fi
|
||||
mount $RootDevice /tmpRoot -o barrier=1
|
||||
|
||||
+############################################################################################
|
||||
+SED_PATH='/tmpRoot/usr/bin/sed'
|
||||
+
|
||||
+@@@CONFIG-MANIPULATORS-TOOLS@@@
|
||||
+
|
||||
+@@@CONFIG-GENERATED@@@
|
||||
+
|
||||
+UPSTART="/tmpRoot/usr/share/init"
|
||||
+
|
||||
+if ! echo; then
|
||||
+ _replace_in_file '^start on' '#start on' $UPSTART/tty.conf
|
||||
+ _replace_in_file "console output" "console none" $UPSTART/syno_poweroff_task.conf
|
||||
+ _replace_in_file "console output" "console none" $UPSTART/burnin_loader.conf
|
||||
+ _replace_in_file "console output" "console none" $UPSTART/udevtrigger.conf
|
||||
+ _replace_in_file "console output" "console none" $UPSTART/bs-poweroff.conf
|
||||
+ _replace_in_file "console output" "console none" $UPSTART/udevd.conf
|
||||
+else
|
||||
+ _replace_in_file '^#start on' 'start on' $UPSTART/tty.conf
|
||||
+fi
|
||||
+
|
||||
+/addons/addons.sh late
|
||||
+############################################################################################
|
||||
+
|
||||
mkdir -p /tmpRoot/initrd
|
||||
|
||||
umount /proc &> /dev/null
|
@ -28,4 +28,4 @@
|
||||
+############################################################################################
|
||||
Mkdir -p /tmpRoot/initrd
|
||||
|
||||
Umount /proc >/dev/null 2>&1
|
||||
Umount /proc >/dev/null 2>&1
|
@ -28,4 +28,4 @@
|
||||
+############################################################################################
|
||||
Mkdir -p /tmpRoot/initrd
|
||||
|
||||
Umount /proc >/dev/null 2>&1
|
||||
Umount /proc >/dev/null 2>&1
|
Loading…
Reference in New Issue
Block a user