mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 13:54:37 +08:00
remove duplicate core/pf hibernate dir
This commit is contained in:
parent
b2e2a1cd0b
commit
470e9ed74c
@ -1,43 +0,0 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=hibernate-script
|
||||
pkgver=2.0
|
||||
pkgrel=1
|
||||
pkgdesc="Set of scripts for managing tux on ice, hibernation and suspend to RAM"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.tuxonice.net"
|
||||
license=('GPL')
|
||||
depends=('bash' 'kbd')
|
||||
options=(!strip)
|
||||
backup=('etc/hibernate/hibernate.conf' 'etc/hibernate/tuxonice.conf' \
|
||||
'etc/hibernate/disk.conf' 'etc/hibernate/ram.conf' \
|
||||
'etc/hibernate/common.conf' 'etc/hibernate/blacklisted-modules' \
|
||||
'etc/hibernate/ususpend-both.conf' 'etc/hibernate/sysfs-ram.conf' \
|
||||
'etc/hibernate/ususpend-ram.conf' 'etc/hibernate/sysfs-disk.conf' \
|
||||
'etc/hibernate/ususpend-disk.conf')
|
||||
source=(http://www.tuxonice.net/downloads/all/${pkgname}-${pkgver}.tar.gz
|
||||
hibernate-script-${pkgver}-arch.patch
|
||||
hibernate.rc)
|
||||
md5sums=('5c21770afbae503450e3c4a5502bf29d'
|
||||
'2e6dba2c90e90952b8b1f167045c38e6'
|
||||
'5d7e83902a00bf72b1de97a5450a558e')
|
||||
|
||||
|
||||
build() {
|
||||
cd $srcdir/hibernate-script-$pkgver
|
||||
# Fix scriptlets to work properly with Archlinux
|
||||
patch -Np1 -i $srcdir/hibernate-script-${pkgver}-arch.patch || return 1
|
||||
export BASE_DIR=${pkgdir}
|
||||
export PREFIX=/usr
|
||||
export MAN_DIR=$BASE_DIR$PREFIX/share/man
|
||||
install -dm755 ${pkgdir}/etc/{rc,logrotate}.d
|
||||
./install.sh || return 1
|
||||
install -m 755 $srcdir/hibernate.rc $pkgdir/etc/rc.d/hibernate-cleanup
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
diff -Nur hibernate-script-1.96.orig/common.conf hibernate-script-1.96/common.conf
|
||||
--- hibernate-script-1.96.orig/common.conf 2007-07-16 14:32:41.000000000 +0200
|
||||
+++ hibernate-script-1.96/common.conf 2007-08-26 17:44:47.000000000 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
# AlwaysForce yes
|
||||
# AlwaysKill yes
|
||||
# HibernateVT 15
|
||||
-# Distribution debian (or fedora/gentoo/mandrake/redhat/slackware/suse)
|
||||
+Distribution arch
|
||||
# XDisplay :0
|
||||
|
||||
##############################################################################
|
||||
diff -Nur hibernate-script-1.96.orig/scriptlets.d/hardware_tweaks hibernate-script-1.96/scriptlets.d/hardware_tweaks
|
||||
--- hibernate-script-1.96.orig/scriptlets.d/hardware_tweaks 2007-07-16 14:33:09.000000000 +0200
|
||||
+++ hibernate-script-1.96/scriptlets.d/hardware_tweaks 2007-08-26 17:44:47.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.96.orig/scriptlets.d/network hibernate-script-1.96/scriptlets.d/network
|
||||
--- hibernate-script-1.96.orig/scriptlets.d/network 2007-07-16 14:33:09.000000000 +0200
|
||||
+++ hibernate-script-1.96/scriptlets.d/network 2007-08-26 17:44:47.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.96.orig/scriptlets.d/services hibernate-script-1.96/scriptlets.d/services
|
||||
--- hibernate-script-1.96.orig/scriptlets.d/services 2007-07-16 14:33:09.000000000 +0200
|
||||
+++ hibernate-script-1.96/scriptlets.d/services 2007-08-26 17:44:47.000000000 +0200
|
||||
@@ -75,7 +75,7 @@
|
||||
debian|ubuntu|redhat|fedora)
|
||||
INITDIR=/etc/init.d
|
||||
;;
|
||||
- slackware)
|
||||
+ slackware|arch)
|
||||
INITDIR=/etc/rc.d
|
||||
;;
|
||||
*)
|
@ -1,68 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
# This script invalidates any stale swsusp and Software Suspend 2 images. It
|
||||
# searches all swap partitions on your machine, as well as Suspend2's
|
||||
# filewriter files (by way of the hibernate script telling it where to find
|
||||
# it).
|
||||
#
|
||||
# It should be called on boot, after mounting filesystems, but before enabling
|
||||
# swap or clearing out /var/run. Copy this into /etc/init.d/ (or the appropriate
|
||||
# place on your system), then add a symlink at the appropriate point on boot.
|
||||
# On a Debian system, you would do this:
|
||||
# update-rc.d hibernate-cleanup.sh start 31 S .
|
||||
#
|
||||
# On other SysV-based systems, you would do something like:
|
||||
# ln -s ../init.d/hibernate-cleanup.sh /etc/rcS.d/S31hibernate-cleanup.sh
|
||||
|
||||
HIBERNATE_FILEWRITER_TRAIL="/var/run/suspend2_filewriter_image_exists"
|
||||
|
||||
clear_swap() {
|
||||
local where wason
|
||||
where=$1
|
||||
wason=
|
||||
swapoff $where 2>/dev/null && wason=yes
|
||||
mkswap $where > /dev/null || stat_append " (failed: $?)"
|
||||
[ -n "$wason" ] && swapon $where
|
||||
}
|
||||
|
||||
check_swap_sig() {
|
||||
local where what type rest p c
|
||||
while read where what type rest ; do
|
||||
test "$type" = "swap" || continue
|
||||
case "$(dd if=$where bs=1 count=6 skip=4086 2>/dev/null)" in
|
||||
S1SUSP|S2SUSP|ULSUSP|pmdisk|[zZ]*)
|
||||
stat_append "$where"
|
||||
clear_swap $where
|
||||
stat_append ", "
|
||||
esac
|
||||
done < /etc/fstab
|
||||
}
|
||||
|
||||
check_filewriter_sig() {
|
||||
local target
|
||||
[ -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
|
||||
stat_append -n "$target, "
|
||||
rm -f $HIBERNATE_FILEWRITER_TRAIL
|
||||
esac
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Invalidating stale software suspend images... "
|
||||
check_swap_sig
|
||||
check_filewriter_sig
|
||||
stat_done
|
||||
;;
|
||||
stop)
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop}"
|
||||
esac
|
Loading…
Reference in New Issue
Block a user