Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etercifs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etercifs
Commits
292da12c
Commit
292da12c
authored
Apr 03, 2009
by
Konstantin Baev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4.3.2-alt1.etermount
- Add etermount script
parent
3257910c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
1 deletion
+60
-1
etercifs.spec
etercifs.spec
+10
-1
etermount
etercifs/etermount
+50
-0
No files found.
etercifs.spec
View file @
292da12c
...
...
@@ -24,7 +24,7 @@
Name: etercifs
Version: 4.3.2
Release: alt1
Release: alt1
.etermount
Summary: Advanced Common Internet File System for Linux with Etersoft extension
...
...
@@ -81,6 +81,8 @@ echo DATADIR=%_datadir/%name > %buildroot%_sysconfdir/%name.conf
echo SRC_DIR=%_usrsrc/%name-%version >> %buildroot%_sysconfdir/%name.conf
echo MODULENAME=%name >> %buildroot%_sysconfdir/%name.conf
echo MODULEVERSION=%version >> %buildroot%_sysconfdir/%name.conf
echo MOUNT_OPTIONS=user=guest,pass=,rw,iocharset=utf8,noperm,forcemand,direct >> %buildroot%_sysconfdir/%name.conf
echo DEFAULT_MOUNTPOINT=/net/sharebase >> %buildroot%_sysconfdir/%name.conf
mkdir -p %buildroot%_datadir/%name
install -m644 buildmodule.sh %buildroot%_datadir/%name
...
...
@@ -107,6 +109,9 @@ cp %SOURCE27 %buildroot/%etercifs_src/%src_package_name-2.6.27-%src_2_6_27_versi
cp %SOURCE28 %buildroot/%etercifs_src/%src_package_name-2.6.28-%src_2_6_28_version.tar.bz2
cp %SOURCE29 %buildroot/%etercifs_src/%src_package_name-2.6.29-%src_2_6_29_version.tar.bz2
mkdir -p %buildroot%_sbindir
install -m755 etermount %buildroot%_sbindir/
%post
%post_service %name
...
...
@@ -119,8 +124,12 @@ cp %SOURCE29 %buildroot/%etercifs_src/%src_package_name-2.6.29-%src_2_6_29_versi
%_initdir/%name
%_initdir/%name.outformat
%doc README.ETER AUTHORS CHANGES README TODO
%_sbindir/etermount
%changelog
* Wed Apr 01 2009 Konstantin Baev <kipruss@altlinux.org> 4.3.2-alt1.etermount
- Add etermount script
* Wed Apr 01 2009 Konstantin Baev <kipruss@altlinux.org> 4.3.2-alt1
- Fixed bug connected with not moving pointer after cifs_user_read() in cifs_file_aio_read()
...
...
etercifs/etermount
0 → 100644
View file @
292da12c
#!/bin/bash
# 2009 (c) Etersoft http://etersoft.ru
# Author: Konstantin Baev <kipruss@etersoft.ru>
# GNU Public License
# Script for mount cifs shares with recommended mount options
fatal
()
{
echo
$@
exit
1
}
if
[
-f
/etc/etercifs.conf
]
;
then
.
/etc/etercifs.conf
else
fatal
"Not found configuration file /etc/etercifs.conf"
fi
[
"
$UID
"
=
"0"
]
&&
SUDO
=
||
SUDO
=
sudo
create_share_dir
()
{
if
[
-d
"
$1
"
]
;
then
[
-n
"
`
ls
$1
`
"
]
&&
fatal
"Error: the folder
$1
is not empty!"
echo
"Info: the folder
$1
exists and empty"
else
if
$(
mkdir
-p
"
$1
"
)
;
then
echo
"Info: the folder
$1
was created"
else
fatal
"Error while creating the folder
$1
"
fi
fi
}
[
"$#"
-ge
1
-a
"$#"
-le
2
]
||
fatal
'Usage: etermount <//server/share> [</path/mountpoint>]'
if
[
"
$2
"
==
''
]
;
then
SHARE_PATH
=
$DEFAULT_MOUNTPOINT
else
SHARE_PATH
=
"
$2
"
fi
create_share_dir
$SHARE_PATH
if
$(
$SUDO
mount
-t
cifs
"
$1
"
$SHARE_PATH
-o
$MOUNT_OPTIONS
)
;
then
echo
"Info: mount of share
$1
in mountpoint
$SHARE_PATH
has been successfully"
else
fatal
"Warning: error while mount of share
$1
in mountpoint
$SHARE_PATH
!"
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment