Search
j0ke.net Open Build Service
>
Projects
>
hardware
:
flashcache
>
flashcache
> boot.flashcache
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File boot.flashcache of Package flashcache (Revision 14)
Currently displaying revision
14
,
show latest
#!/bin/sh #! /bin/sh # # Copyright (c) 2001 SuSE GmbH Nuernberg, Germany. All rights reserved. # # /etc/init.d/boot.flashcache # ### BEGIN INIT INFO # Provides: boot.flashcache # Required-Start: boot.device-mapper boot.udev boot.rootfsck # Should-Start: boot.multipath boot.md boot.dmraid boot.lvm # Required-Stop: $null # Should-Stop: $null # Default-Start: B # Default-Stop: # Description: start flashcache volumes ### END INIT INFO PREREQ="mdadm udev" prereqs() { echo "$PREREQ" } case $1 in prereqs) prereqs exit 0 ;; esac . /etc/rc.status rc_reset case "$1" in start) echo "Scanning for flashcache devices" echo " Waiting for udev to settle..." /sbin/udevadm settle --timeout=30 rc_status -v PARTITIONS=`cat /proc/partitions | awk '{ print $NF; }' | grep -v name` for P in $PARTITIONS; do if /sbin/flashcache_load "/dev/$P" 2> /dev/null; then echo " Loaded flashcache device from /dev/$P" rc_status -v fi done echo "Flashcache scanning done." ;; stop) echo "Stopping active flashcache devices" DMDEVS=`/sbin/dmsetup status |grep "flashcache stats" | awk -F: '{print $1}'` for D in $DMDEVS; do echo " disabling device $D" /sbin/dmsetup remove $D rc_status -v done ;; status) rc_failed 4 rc_status -v ;; reload) $0 start ;; *) echo "Usage: $0 {start|stop|status|reload}" exit 1 ;; esac rc_exit