diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index 44039bed67..9ee96914bf 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -640,25 +640,6 @@ BOOT_STEP=final - # no suspend when booted from nonpersistent storage - STORAGE=$(cat /proc/mounts | grep " /sysroot/storage " | awk '{print $1}' | awk -F '/' '{print $3}') - if [ -n "$STORAGE" ] ; then - removable="/sys/class/block/*/$STORAGE/../removable" - if [ -e $removable ] ; then - if [ "$(cat $removable 2>/dev/null)" = "1" ] ; then - SUSPEND_DISABLED=yes - fi - fi - fi - FLASH=$(cat /proc/mounts | grep " /sysroot/flash " | awk '{print $1}' | awk -F '/' '{print $3}') - if [ -n "$FLASH" ] ; then - removable="/sys/class/block/*/$FLASH/../removable" - if [ -e $removable ] ; then - if [ "$(cat $removable 2>/dev/null)" = "1" ] ; then - SUSPEND_DISABLED=yes - fi - fi - fi # move some special filesystems /bin/busybox mount --move /dev /sysroot/dev /bin/busybox mount --move /proc /sysroot/proc @@ -672,10 +653,6 @@ if [ "$STORAGE_NETBOOT" = "yes" ] ; then echo "" > /sysroot/dev/.storage_netboot fi - # no suspend when booted from nonpersistent storage - if [ "$SUSPEND_DISABLED" = "yes" ] ; then - echo "" > /sysroot/dev/.suspend_disabled - fi # switch to new sysroot and start real init exec /bin/busybox switch_root /sysroot /usr/lib/systemd/systemd $INIT_ARGS diff --git a/packages/sysutils/systemd/patches/systemd-11_disable-suspend-if-dev-.suspend_disabled-exist.patch b/packages/sysutils/systemd/patches/systemd-11_disable-suspend-if-dev-.suspend_disabled-exist.patch deleted file mode 100644 index 7285d74f8d..0000000000 --- a/packages/sysutils/systemd/patches/systemd-11_disable-suspend-if-dev-.suspend_disabled-exist.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a8ad8aadc39820594f89d43aa0f8d527b256aa99 Mon Sep 17 00:00:00 2001 -From: Stefan Saraev -Date: Sat, 22 Mar 2014 13:40:55 +0200 -Subject: [PATCH] disable suspend if /dev/.suspend_disabled exist - ---- - src/shared/sleep-config.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c -index cf1cd40..f6ad307 100644 ---- a/src/shared/sleep-config.c -+++ b/src/shared/sleep-config.c -@@ -256,6 +256,10 @@ int can_sleep(const char *verb) { - streq(verb, "hibernate") || - streq(verb, "hybrid-sleep")); - -+ // boo -+ if (access("/dev/.suspend_disabled", F_OK) == 0) -+ return false; -+ - r = parse_sleep_config(verb, &modes, &states); - if (r < 0) - return false; --- -1.9.1 -