From d2f5adf729a801f5f2a41e991a69ce23d2ba5378 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Sun, 15 Sep 2013 21:52:58 +0300 Subject: [PATCH] busybox: add dummy 'fs-resize' service --- packages/sysutils/busybox/install | 4 +++ packages/sysutils/busybox/scripts/fs-resize | 29 +++++++++++++++++++ .../busybox/system.d/fs-resize.service | 16 ++++++++++ 3 files changed, 49 insertions(+) create mode 100755 packages/sysutils/busybox/scripts/fs-resize create mode 100644 packages/sysutils/busybox/system.d/fs-resize.service diff --git a/packages/sysutils/busybox/install b/packages/sysutils/busybox/install index b0a88d6285..7145774f7e 100755 --- a/packages/sysutils/busybox/install +++ b/packages/sysutils/busybox/install @@ -44,6 +44,9 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw -m sha512 $USER_PASSWORD`" cp $PKG_DIR/scripts/pastebinit $INSTALL/usr/bin/ ln -sf pastebinit $INSTALL/usr/bin/paste + mkdir -p $INSTALL/usr/lib/openelec + cp $PKG_DIR/scripts/fs-resize $INSTALL/usr/lib/openelec + mkdir -p $INSTALL/etc cp $PKG_DIR/config/profile $INSTALL/etc cp $PKG_DIR/config/inputrc $INSTALL/etc @@ -96,4 +99,5 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw -m sha512 $USER_PASSWORD`" enable_service show-version.service enable_service var.mount enable_service var-log-debug.service + enable_service fs-resize.service diff --git a/packages/sysutils/busybox/scripts/fs-resize b/packages/sysutils/busybox/scripts/fs-resize new file mode 100755 index 0000000000..32b7b5fcef --- /dev/null +++ b/packages/sysutils/busybox/scripts/fs-resize @@ -0,0 +1,29 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +# +# !!! BIG FAT WARNING !!! +# !!! WORK IN PROGRESS !!! +# + +if [ -e /storage/.please_resize_me ] ; then + rm -f /storage/.please_resize_me +fi diff --git a/packages/sysutils/busybox/system.d/fs-resize.service b/packages/sysutils/busybox/system.d/fs-resize.service new file mode 100644 index 0000000000..022df942c3 --- /dev/null +++ b/packages/sysutils/busybox/system.d/fs-resize.service @@ -0,0 +1,16 @@ +[Unit] +Description=FS Resize +DefaultDependencies=false +After=show-version.service +Before=local-fs-pre.target shutdown.target +Conflicts=shutdown.target + +ConditionPathExists=|/storage/.please_resize_me + +[Service] +Type=oneshot +ExecStart=/usr/lib/openelec/fs-resize +StandardOutput=tty + +[Install] +WantedBy=local-fs-pre.target