OBS User unknown 2007-02-09 00:22:45 +00:00 committed by Git OBS Bridge
parent 9e0f7bb264
commit 24f786add4
3 changed files with 116 additions and 6 deletions

83
boot.fuse Normal file
View File

@ -0,0 +1,83 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: boot.fuse
# Required-Start:
# Should-Start: boot.udev
# Required-Stop:
# Default-Start: B
# Default-Stop:
# Short-Description: Start and stop fuse.
# Description: Load the fuse module and mount the fuse control
# filesystem.
### END INIT INFO
PATH="/sbin:/bin"
MOUNTPOINT=/sys/fs/fuse/connections
test -x /usr/bin/fusermount || exit 5
. /etc/rc.status
case "$1" in
start|restart|force-reload)
if ! grep -qw fuse /proc/filesystems; then
echo -n "Loading fuse module "
if ! modprobe fuse >/dev/null 2>&1; then
rc_status -v
rc_exit
fi
else
echo -n "Fuse filesystem already available"
fi
rc_status -v
if grep -qw fusectl /proc/filesystems && \
! grep -qw $MOUNTPOINT /proc/mounts; then
echo -n "Mounting fuse control filesystem"
mount -t fusectl none $MOUNTPOINT >/dev/null 2>&1
else
echo -n "Fuse control filesystem already available"
fi
rc_status -v
;;
stop)
if ! grep -qw fuse /proc/filesystems; then
echo -n "Fuse filesystem not loaded"
rc_failed 7
rc_status -v
rc_exit
fi
if grep -qw $MOUNTPOINT /proc/mounts; then
echo -n "Unmounting fuse control filesystem"
umount $MOUNTPOINT >/dev/null 2>&1
else
echo -n "Fuse control filesystem not mounted"
fi
rc_status -v
if grep -qw "^fuse" /proc/modules; then
echo -n "Unloading fuse module"
rmmod fuse >/dev/null 2>&1
else
echo -n "Fuse module not loaded"
fi
rc_status -v
;;
reload)
echo -n "Reloading fuse filesystem"
rc_failed 3
rc_status -v
;;
status)
echo -n "Checking fuse filesystem"
rc_reset
if ! grep -qw fuse /proc/filesystems; then
rc_failed 3
fi
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload|status}"
exit 1
;;
esac
rc_exit

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Feb 9 01:08:24 CET 2007 - ro@suse.de
- change fillup_and_insserv to insserv_force_if_yast in post-script
(there is no sysconfig file involved here)
-------------------------------------------------------------------
Wed Feb 7 16:43:36 CET 2007 - mszeredi@suse.cz
- added init script which loads the fuse module and mounts the control
filesystem (#223663)
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 5 18:25:50 CET 2007 - mszeredi@suse.cz Mon Feb 5 18:25:50 CET 2007 - mszeredi@suse.cz

View File

@ -13,14 +13,15 @@
Name: fuse Name: fuse
Summary: Userspace File System Summary: Userspace File System
Version: 2.6.3 Version: 2.6.3
Release: 1 Release: 3
License: GNU General Public License (GPL), GNU Library General Public License v. 2.0 and 2.1 (LGPL) License: GNU General Public License (GPL), GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Group: System/Filesystems Group: System/Filesystems
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
Source1: boot.fuse
Patch: fuse-install-fix.diff Patch: fuse-install-fix.diff
URL: http://fuse.sf.net URL: http://fuse.sourceforge.net
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: permissions PreReq: %insserv_prereq permissions
%description %description
With FUSE, a userspace program can export a file system through the With FUSE, a userspace program can export a file system through the
@ -32,7 +33,7 @@ To use fuse, you need an additional fuse module, like sshfs.
Authors: Authors:
-------- --------
Miklos Szeredi <mszeredi@inf.bme.hu> Miklos Szeredi <miklos@szeredi.hu>
%package devel %package devel
Summary: user space filesystem Summary: user space filesystem
@ -69,21 +70,29 @@ make
%install %install
make DESTDIR="$RPM_BUILD_ROOT" install make DESTDIR="$RPM_BUILD_ROOT" install
rm -rf $RPM_BUILD_ROOT/%{_sysconfdir}/init.d rm -rf $RPM_BUILD_ROOT/%{_sysconfdir}/init.d
install -m755 -D %{S:1} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/boot.fuse
%post %post
/sbin/ldconfig %{insserv_force_if_yast boot.fuse}
%run_ldconfig
%run_permissions %run_permissions
%verifyscript %verifyscript
%verify_permissions -e %{_bindir}/fusermount %verify_permissions -e %{_bindir}/fusermount
%postun -p /sbin/ldconfig %preun
%stop_on_removal boot.fuse
%postun
%run_ldconfig
%insserv_cleanup
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%config %{_sysconfdir}/init.d/boot.fuse
%doc AUTHORS COPYING* ChangeLog FAQ NEWS README* %doc AUTHORS COPYING* ChangeLog FAQ NEWS README*
%{_libdir}/lib*.so.* %{_libdir}/lib*.so.*
%verify(not mode) %attr(4750,root,trusted) %{_bindir}/fusermount %verify(not mode) %attr(4750,root,trusted) %{_bindir}/fusermount
@ -103,6 +112,12 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%changelog -n fuse %changelog -n fuse
* Fri Feb 09 2007 - ro@suse.de
- change fillup_and_insserv to insserv_force_if_yast in post-script
(there is no sysconfig file involved here)
* Wed Feb 07 2007 - mszeredi@suse.cz
- added init script which loads the fuse module and mounts the control
filesystem (#223663)
* Mon Feb 05 2007 - mszeredi@suse.cz * Mon Feb 05 2007 - mszeredi@suse.cz
- updated to version 2.6.3: - updated to version 2.6.3:
* fix regression causing an abort during heavy filesystem use * fix regression causing an abort during heavy filesystem use