[arch-commits] CVS update of extra/system/hibernate-script (4 files)
Thomas Baechler
thomas at archlinux.org
Mon May 21 17:54:50 UTC 2007
Date: Monday, May 21, 2007 @ 13:54:50
Author: thomas
Path: /home/cvs-extra/extra/system/hibernate-script
Added: hibernate-script-1.95-arch.patch (1.1)
Modified: PKGBUILD (1.10 -> 1.11) hibernate.rc (1.1 -> 1.2)
Removed: hibernate-script-1.94-arch.patch (1.1)
update to 1.95, new patch, adjusted rc script to the new version from upstream
----------------------------------+
PKGBUILD | 18 ++---
hibernate-script-1.94-arch.patch | 122 -------------------------------------
hibernate-script-1.95-arch.patch | 54 ++++++++++++++++
hibernate.rc | 40 +++---------
4 files changed, 74 insertions(+), 160 deletions(-)
Index: extra/system/hibernate-script/PKGBUILD
diff -u extra/system/hibernate-script/PKGBUILD:1.10 extra/system/hibernate-script/PKGBUILD:1.11
--- extra/system/hibernate-script/PKGBUILD:1.10 Sat Apr 14 10:21:10 2007
+++ extra/system/hibernate-script/PKGBUILD Mon May 21 13:54:50 2007
@@ -1,13 +1,13 @@
-# $Id: PKGBUILD,v 1.10 2007/04/14 14:21:10 james Exp $
+# $Id: PKGBUILD,v 1.11 2007/05/21 17:54:50 thomas Exp $
# Maintainer: James Rayner <iphitus at gmail.com>
# Contributor: sonixX http://bbs.archlinux.org/viewtopic.php?p=95310#95310
pkgname=hibernate-script
-pkgver=1.94
-pkgrel=5
+pkgver=1.95
+pkgrel=1
pkgdesc="Scripts needed for software suspend aka hibernate"
arch=(i686 x86_64)
-options=(NOSTRIP)
+options=(!strip)
backup=('etc/hibernate/hibernate.conf' 'etc/hibernate/suspend2.conf' \
'etc/hibernate/disk.conf' 'etc/hibernate/ram.conf' \
'etc/hibernate/common.conf' 'etc/hibernate/blacklisted-modules' \
@@ -16,17 +16,17 @@
'etc/hibernate/ususpend-disk.conf')
url="http://www.suspend2.net"
source=(http://www.suspend2.net/downloads/all/hibernate-script-$pkgver.tar.gz \
- hibernate-script-1.94-arch.patch hibernate.rc)
-md5sums=('f8826d4c96e320902382f29c91694c04' 'ecaf79204e040a98cdfdb3f845993319'\
- '72fc553179218c7a607b67c426806b02')
+ hibernate-script-1.95-arch.patch hibernate.rc)
+md5sums=('026a7a8992da4fe56fb19530df998806'
+ '920037161b4478cf0b6c6457add7ab41'
+ '7e470bc1f8090c41f57f50b63aba6d29')
depends=(bash kbd)
build() {
cd $startdir/src/hibernate-script-$pkgver
# Fix scriptlets to work properly with Archlinux
- # Fix paths for suspend2 2.2.9 and fix hibernate version
- patch -Np1 -i ../hibernate-script-1.94-arch.patch || return 1
+ patch -Np1 -i ../hibernate-script-1.95-arch.patch || return 1
export BASE_DIR=${startdir}/pkg
export PREFIX=/usr
mkdir -p $startdir/pkg/etc/{rc,logrotate}.d
Index: extra/system/hibernate-script/hibernate-script-1.94-arch.patch
diff -u extra/system/hibernate-script/hibernate-script-1.94-arch.patch:1.1 extra/system/hibernate-script/hibernate-script-1.94-arch.patch:removed
--- extra/system/hibernate-script/hibernate-script-1.94-arch.patch:1.1 Sat Dec 2 15:32:27 2006
+++ extra/system/hibernate-script/hibernate-script-1.94-arch.patch Mon May 21 13:54:50 2007
@@ -1,122 +0,0 @@
-diff -Nur hibernate-script-1.94.orig/common.conf hibernate-script-1.94/common.conf
---- hibernate-script-1.94.orig/common.conf 2006-10-09 17:08:04.000000000 +0200
-+++ hibernate-script-1.94/common.conf 2006-12-02 21:17:06.000000000 +0100
-@@ -14,7 +14,7 @@
- # AlwaysForce yes
- # AlwaysKill yes
- # HibernateVT 15
--# Distribution debian (or fedora/gentoo/mandrake/redhat/slackware/suse)
-+Distribution arch (or debian/fedora/gentoo/mandrake/redhat/slackware/suse)
- # XDisplay :0
-
- ##############################################################################
-diff -Nur hibernate-script-1.94.orig/hibernate.sh hibernate-script-1.94/hibernate.sh
---- hibernate-script-1.94.orig/hibernate.sh 2006-10-09 17:08:04.000000000 +0200
-+++ hibernate-script-1.94/hibernate.sh 2006-12-02 20:48:25.000000000 +0100
-@@ -58,7 +58,7 @@
- SCRIPTLET_PATH="$SWSUSP_D/scriptlets.d /usr/local/share/hibernate/scriptlets.d /usr/share/hibernate/scriptlets.d"
- DEFAULT_CONFIG_FILE="$SWSUSP_D/hibernate.conf"
- EXE=`basename $0`
--VERSION="1.93"
-+VERSION="1.94"
-
- # Add these to the $PATH just in case.
- PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
-diff -Nur hibernate-script-1.94.orig/install.sh hibernate-script-1.94/install.sh
---- hibernate-script-1.94.orig/install.sh 2006-10-09 17:08:04.000000000 +0200
-+++ hibernate-script-1.94/install.sh 2006-12-02 21:15:30.000000000 +0100
-@@ -13,7 +13,11 @@
- [ -z "$RAM_CONFIG_FILE" ] && RAM_CONFIG_FILE=$CONFIG_DIR/ram.conf
- [ -z "$DISK_CONFIG_FILE" ] && DISK_CONFIG_FILE=$CONFIG_DIR/disk.conf
- [ -z "$S2_CONFIG_FILE" ] && S2_CONFIG_FILE=$CONFIG_DIR/suspend2.conf
--[ -z "$US_CONFIG_FILE" ] && US_CONFIG_FILE=$CONFIG_DIR/ususpend.conf
-+[ -z "$SYSFS_RAM_CONFIG_FILE" ] && SYSFS_RAM_CONFIG_FILE=$CONFIG_DIR/sysfs-ram.conf
-+[ -z "$SYSFS_DISK_CONFIG_FILE" ] && SYSFS_DISK_CONFIG_FILE=$CONFIG_DIR/sysfs-disk.conf
-+[ -z "$US_BOTH_CONFIG_FILE" ] && US_BOTH_CONFIG_FILE=$CONFIG_DIR/ususpend-both.conf
-+[ -z "$US_RAM_CONFIG_FILE" ] && US_RAM_CONFIG_FILE=$CONFIG_DIR/ususpend-ram.conf
-+[ -z "$US_DISK_CONFIG_FILE" ] && US_DISK_CONFIG_FILE=$CONFIG_DIR/ususpend-disk.conf
- [ -z "$COMMON_CONFIG_FILE" ] && COMMON_CONFIG_FILE=$CONFIG_DIR/common.conf
- [ -z "$BLACKLIST" ] && BLACKLIST=$CONFIG_DIR/blacklisted-modules
- [ -z "$LOGROTATE_DIR" ] && LOGROTATE_DIR=${BASE_DIR}/etc/logrotate.d
-@@ -52,16 +56,24 @@
- cp -a ram.conf ${RAM_CONFIG_FILE}.dist
- cp -a disk.conf ${DISK_CONFIG_FILE}.dist
- cp -a suspend2.conf ${S2_CONFIG_FILE}.dist
-- cp -a ususpend.conf ${US_CONFIG_FILE}.dist
- cp -a common.conf ${COMMON_CONFIG_FILE}.dist
-+ cp -a ususpend-both.conf ${US_BOTH_CONFIG_FILE}.dist
-+ cp -a ususpend-disk.conf ${US_DISK_CONFIG_FILE}.dist
-+ cp -a ususpend-ram.conf ${US_RAM_CONFIG_FILE}.dist
-+ cp -a sysfs-disk.conf ${SYSFS_DISK_CONFIG_FILE}.dist
-+ cp -a sysfs-ram.conf ${SYSFS_RAM_CONFIG_FILE}.dist
- EXISTING_CONFIG=1
- else
- cp -a hibernate.conf $CONFIG_FILE
- cp -a ram.conf $RAM_CONFIG_FILE
- cp -a disk.conf ${DISK_CONFIG_FILE}
- cp -a suspend2.conf ${S2_CONFIG_FILE}
-- cp -a ususpend.conf ${US_CONFIG_FILE}
- cp -a common.conf ${COMMON_CONFIG_FILE}
-+ cp -a ususpend-both.conf ${US_BOTH_CONFIG_FILE}
-+ cp -a ususpend-disk.conf ${US_DISK_CONFIG_FILE}
-+ cp -a ususpend-ram.conf ${US_RAM_CONFIG_FILE}
-+ cp -a sysfs-disk.conf ${SYSFS_DISK_CONFIG_FILE}
-+ cp -a sysfs-ram.conf ${SYSFS_RAM_CONFIG_FILE}
- fi
-
- cp -a blacklisted-modules $BLACKLIST
-diff -Nur hibernate-script-1.94.orig/scriptlets.d/hardware_tweaks hibernate-script-1.94/scriptlets.d/hardware_tweaks
---- hibernate-script-1.94.orig/scriptlets.d/hardware_tweaks 2006-10-09 17:08:04.000000000 +0200
-+++ hibernate-script-1.94/scriptlets.d/hardware_tweaks 2006-12-02 20:58:09.000000000 +0100
-@@ -83,7 +83,7 @@
- AddConfigHelp "Runi915resolution <boolean>" "Set to run 915resolution before switching back to X."
-
- i915resolutionResume() {
-- /etc/init.d/915resolution start || return 1
-+ /etc/rc.d/915resolution start || return 1
- return 0
- }
-
-diff -Nur hibernate-script-1.94.orig/scriptlets.d/network hibernate-script-1.94/scriptlets.d/network
---- hibernate-script-1.94.orig/scriptlets.d/network 2006-10-09 17:08:04.000000000 +0200
-+++ hibernate-script-1.94/scriptlets.d/network 2006-12-02 20:56:36.000000000 +0100
-@@ -90,6 +90,14 @@
- NetworkDetectDistro() {
- # Use either a given $DISTRIBUTION or autodetect one.
- case "$DISTRIBUTION" in
-+ arch)
-+ network_ifup() {
-+ /etc/rc.d/network ifup $1
-+ }
-+ network_ifdown() {
-+ /etc/rc.d/network ifdown $1
-+ }
-+ ;;
- gentoo)
- network_ifup() {
- [ -x "/etc/init.d/net.$1" ] && /etc/init.d/net.$1 start
-diff -Nur hibernate-script-1.94.orig/scriptlets.d/services hibernate-script-1.94/scriptlets.d/services
---- hibernate-script-1.94.orig/scriptlets.d/services 2006-10-09 17:08:04.000000000 +0200
-+++ hibernate-script-1.94/scriptlets.d/services 2006-12-02 20:57:43.000000000 +0100
-@@ -75,7 +75,7 @@
- debian|redhat|fedora)
- INITDIR=/etc/init.d
- ;;
-- slackware)
-+ slackware|arch)
- INITDIR=/etc/rc.d
- ;;
- *)
-diff -Nur hibernate-script-1.94.orig/scriptlets.d/suspend2 hibernate-script-1.94/scriptlets.d/suspend2
---- hibernate-script-1.94.orig/scriptlets.d/suspend2 2006-10-09 17:08:04.000000000 +0200
-+++ hibernate-script-1.94/scriptlets.d/suspend2 2006-12-02 20:48:25.000000000 +0100
-@@ -20,7 +20,9 @@
- STORAGEMAN_ROOT="$SWSUSP_ROOT"
- [ -d "$SWSUSP_ROOT/compression/" ] && COMPRESSION_ROOT="$SWSUSP_ROOT/compression"
- [ -d "$SWSUSP_ROOT/encryption/" ] && ENCRYPTION_ROOT="$SWSUSP_ROOT/encryption"
-+[ -d "$SWSUSP_ROOT/file/" ] && FILEWRITER_ROOT="$SWSUSP_ROOT/file"
- [ -d "$SWSUSP_ROOT/filewriter/" ] && FILEWRITER_ROOT="$SWSUSP_ROOT/filewriter"
-+[ -d "$SWSUSP_ROOT/swap/" ] && SWAPWRITER_ROOT="$SWSUSP_ROOT/swap"
- [ -d "$SWSUSP_ROOT/swapwriter/" ] && SWAPWRITER_ROOT="$SWSUSP_ROOT/swapwriter"
- [ -d "$SWSUSP_ROOT/user_interface/" ] && UI_ROOT="$SWSUSP_ROOT/user_interface"
- [ -d "$SWSUSP_ROOT/storage_manager/" ] && STORAGEMAN_ROOT="$SWSUSP_ROOT/storage_manager"
Index: extra/system/hibernate-script/hibernate-script-1.95-arch.patch
diff -u /dev/null extra/system/hibernate-script/hibernate-script-1.95-arch.patch:1.1
--- /dev/null Mon May 21 13:54:50 2007
+++ extra/system/hibernate-script/hibernate-script-1.95-arch.patch Mon May 21 13:54:50 2007
@@ -0,0 +1,54 @@
+diff -Nur hibernate-script-1.95.orig/common.conf hibernate-script-1.95/common.conf
+--- hibernate-script-1.95.orig/common.conf 2007-02-08 03:26:39.000000000 +0100
++++ hibernate-script-1.95/common.conf 2007-05-21 19:33:38.000000000 +0200
+@@ -14,7 +14,7 @@
+ # AlwaysForce yes
+ # AlwaysKill yes
+ # HibernateVT 15
+-# Distribution debian (or fedora/gentoo/mandrake/redhat/slackware/suse)
++Distribution arch (or debian/fedora/gentoo/mandrake/redhat/slackware/suse)
+ # XDisplay :0
+
+ ##############################################################################
+diff -Nur hibernate-script-1.95.orig/scriptlets.d/hardware_tweaks hibernate-script-1.95/scriptlets.d/hardware_tweaks
+--- hibernate-script-1.95.orig/scriptlets.d/hardware_tweaks 2007-05-05 01:42:34.000000000 +0200
++++ hibernate-script-1.95/scriptlets.d/hardware_tweaks 2007-05-21 19:36:43.000000000 +0200
+@@ -86,7 +86,7 @@
+ local action
+ action=start
+ [ "$DISTRIBUTION" = "gentoo" ] && action=restart
+- /etc/init.d/915resolution $action || return 1
++ /etc/rc.d/915resolution $action || return 1
+ return 0
+ }
+
+diff -Nur hibernate-script-1.95.orig/scriptlets.d/network hibernate-script-1.95/scriptlets.d/network
+--- hibernate-script-1.95.orig/scriptlets.d/network 2007-04-13 12:02:22.000000000 +0200
++++ hibernate-script-1.95/scriptlets.d/network 2007-05-21 19:33:38.000000000 +0200
+@@ -90,6 +90,14 @@
+ NetworkDetectDistro() {
+ # Use either a given $DISTRIBUTION or autodetect one.
+ case "$DISTRIBUTION" in
++ arch)
++ network_ifup() {
++ /etc/rc.d/network ifup $1
++ }
++ network_ifdown() {
++ /etc/rc.d/network ifdown $1
++ }
++ ;;
+ gentoo)
+ network_ifup() {
+ [ -x "/etc/init.d/net.$1" ] && /etc/init.d/net.$1 start
+diff -Nur hibernate-script-1.95.orig/scriptlets.d/services hibernate-script-1.95/scriptlets.d/services
+--- hibernate-script-1.95.orig/scriptlets.d/services 2007-04-13 12:02:22.000000000 +0200
++++ hibernate-script-1.95/scriptlets.d/services 2007-05-21 19:33:38.000000000 +0200
+@@ -75,7 +75,7 @@
+ debian|ubuntu|redhat|fedora)
+ INITDIR=/etc/init.d
+ ;;
+- slackware)
++ slackware|arch)
+ INITDIR=/etc/rc.d
+ ;;
+ *)
Index: extra/system/hibernate-script/hibernate.rc
diff -u extra/system/hibernate-script/hibernate.rc:1.1 extra/system/hibernate-script/hibernate.rc:1.2
--- extra/system/hibernate-script/hibernate.rc:1.1 Tue Sep 19 20:25:34 2006
+++ extra/system/hibernate-script/hibernate.rc Mon May 21 13:54:50 2007
@@ -17,70 +17,52 @@
# On other SysV-based systems, you would do something like:
# ln -s ../init.d/hibernate-cleanup.sh /etc/rcS.d/S31hibernate-cleanup.sh
-# ported to Arch Linux: Manolis Tzanidakis <manolis at tzanidakis.gr>
-
HIBERNATE_FILEWRITER_TRAIL="/var/run/suspend2_filewriter_image_exists"
-get_swap_id() {
- local line
- fdisk -l | while read line; do
- case "$line" in
- /*Linux\ [sS]wap*) echo "${line%% *}"
- esac
- done
-}
-
clear_swap() {
local where wason
where=$1
wason=
swapoff $where 2>/dev/null && wason=yes
- mkswap $where > /dev/null || echo -n " (failed: $?)"
+ mkswap $where > /dev/null || msg_status " (failed: $?)"
[ -n "$wason" ] && swapon $where
}
check_swap_sig() {
- local part="$(get_swap_id)"
local where what type rest p c
while read where what type rest ; do
test "$type" = "swap" || continue
- c=continue
- for p in $part ; do
- test "$p" = "$where" && c=:
- done
- $c
case "$(dd if=$where bs=1 count=6 skip=4086 2>/dev/null)" in
S1SUSP|S2SUSP|pmdisk|[zZ]*)
- echo -n "$where"
+ msg_status "$where"
clear_swap $where
- echo -n ", "
+ msg_status ", "
esac
done < /etc/fstab
}
check_filewriter_sig() {
local target
- [ -f "$HIBERNATE_FILEWRITER_TRAIL" ] || return
+ [ -f "$HIBERNATE_FILEWRITER_TRAIL" ] || return 0
read target < $HIBERNATE_FILEWRITER_TRAIL
[ -f "$target" ] || return
case "`dd \"if=$target\" bs=8 count=1 2>/dev/null`" in
HaveImag)
/bin/echo -ne "Suspend2\n\0\0" | dd "of=$target" bs=11 count=1 conv=notrunc 2>/dev/null
- echo -n "$target, "
+ msg_status -n "$target, "
rm -f $HIBERNATE_FILEWRITER_TRAIL
esac
}
case "$1" in
start)
- stat_busy "Clearing Software Suspend 2 signatures"
- check_swap_sig
- check_filewriter_sig
+ stat_busy "Invalidating stale software suspend images... "
+ check_swap_sig
+ check_filewriter_sig
stat_done
- ;;
+ ;;
stop)
- /bin/true
- ;;
+ ;;
*)
- echo "usage: $0 {start|stop|restart}"
+ echo "Usage: $0 {start|stop}"
esac
More information about the arch-commits
mailing list