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
0db53c6b
Commit
0db53c6b
authored
Mar 06, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify text out after test review, add print mounted resources in etermount
parent
91901806
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
12 deletions
+18
-12
etercifs.spec
etercifs.spec
+1
-0
etercifs
etercifs/etercifs
+4
-6
etermount
etercifs/etermount
+12
-5
functions.sh
etercifs/functions.sh
+1
-1
No files found.
etercifs.spec
View file @
0db53c6b
...
@@ -131,6 +131,7 @@ SRC_DIR=%_usrsrc/%name-%version
...
@@ -131,6 +131,7 @@ SRC_DIR=%_usrsrc/%name-%version
MODULENAME=%name
MODULENAME=%name
MODULEFILENAME=%name.ko
MODULEFILENAME=%name.ko
MODULEVERSION=%version
MODULEVERSION=%version
PACKAGEVEREL=%version-%release
CHECK_VERSION=1
CHECK_VERSION=1
EOF
EOF
...
...
etercifs/etercifs
View file @
0db53c6b
...
@@ -19,7 +19,7 @@ INSMOD=/sbin/insmod
...
@@ -19,7 +19,7 @@ INSMOD=/sbin/insmod
PACKAGEINFO
=
@DATADIR@/package.conf
PACKAGEINFO
=
@DATADIR@/package.conf
if
[
-f
"
$PACKAGEINFO
"
]
;
then
if
[
-f
"
$PACKAGEINFO
"
]
;
then
.
$PACKAGEINFO
/package.conf
.
$PACKAGEINFO
else
else
fatal
"Not found package information file
$PACKAGEINFO
"
fatal
"Not found package information file
$PACKAGEINFO
"
fi
fi
...
@@ -158,18 +158,16 @@ load_module()
...
@@ -158,18 +158,16 @@ load_module()
success
success
fi
fi
echo
-n
"Loading kernel module
$MODULENAME
... "
get_module_version
get_module_version
echo
-n
"Loading kernel module
$MODULENAME
$MODVER
... "
if
[
"
$MODULEVERSION
"
!=
"
$MODVER
"
]
&&
[
"
$CHECK_VERSION
"
-eq
1
]
;
then
if
[
"
$MODULEVERSION
"
!=
"
$MODVER
"
]
&&
[
"
$CHECK_VERSION
"
-eq
1
]
;
then
[
$MODVER
]
&&
{
failure
failure
show_module_version
show_module_version
echo
" Please, run 'service etercifs build' to build the etercifs module (recommended)"
echo
" Please, run 'service etercifs build' to build the etercifs module (recommended)"
#echo " or run 'CHECK_VERSION=0 service etercifs restart' to disable check."
#echo " or run 'CHECK_VERSION=0 service etercifs restart' to disable check."
return
return
}
fi
fi
$MODPROBE
$MODULENAME
&&
{
success
;
return
;
}
$MODPROBE
$MODULENAME
&&
{
success
;
return
;
}
...
@@ -201,7 +199,6 @@ stop()
...
@@ -201,7 +199,6 @@ stop()
show_module_version
()
show_module_version
()
{
{
echo
" package
$MODULENAME
version
$MODULEVERSION
"
if
[
$MODVER
]
;
then
if
[
$MODVER
]
;
then
echo
" kernel module
$MODULENAME
version
$MODVER
is built for current kernel"
echo
" kernel module
$MODULENAME
version
$MODVER
is built for current kernel"
else
else
...
@@ -227,6 +224,7 @@ show_loaded_module_version()
...
@@ -227,6 +224,7 @@ show_loaded_module_version()
status
()
status
()
{
{
local
PRECOMP
local
PRECOMP
echo
"Package
$MODULENAME
$PACKAGEVEREL
"
echo
"CIFS kernel module status:"
echo
"CIFS kernel module status:"
if
is_moduled
;
then
if
is_moduled
;
then
get_module_version
get_module_version
...
...
etercifs/etermount
View file @
0db53c6b
...
@@ -13,7 +13,7 @@ fatal()
...
@@ -13,7 +13,7 @@ fatal()
PACKAGEINFO
=
@DATADIR@/package.conf
PACKAGEINFO
=
@DATADIR@/package.conf
if
[
-f
"
$PACKAGEINFO
"
]
;
then
if
[
-f
"
$PACKAGEINFO
"
]
;
then
.
$PACKAGEINFO
/package.conf
.
$PACKAGEINFO
else
else
fatal
"Not found package information file
$PACKAGEINFO
"
fatal
"Not found package information file
$PACKAGEINFO
"
fi
fi
...
@@ -44,10 +44,11 @@ create_share_dir()
...
@@ -44,10 +44,11 @@ create_share_dir()
help_text
()
help_text
()
{
{
echo
"Package
$MODULENAME
version
$MODULEVERSION
"
echo
"The utility etermount performs mount network share on a protocol cifs"
echo
"The utility etermount performs mount network share on a protocol cifs"
echo
"with pre-set parameters, which determined in MOUNT_OPTIONS variable"
echo
"with pre-set parameters, which determined in MOUNT_OPTIONS variable"
echo
"in the config file
$CONFIGFILE
"
echo
"in the config file
$CONFIGFILE
"
echo
"(current value
of MOUNT_OPTIONS
is '
$MOUNT_OPTIONS
')"
echo
"(current value is '
$MOUNT_OPTIONS
')"
echo
echo
echo
"To mount the resource //server/share to the mountpoint /path/mountpoint"
echo
"To mount the resource //server/share to the mountpoint /path/mountpoint"
echo
"need to execute the command (with root permissions):"
echo
"need to execute the command (with root permissions):"
...
@@ -56,15 +57,20 @@ help_text()
...
@@ -56,15 +57,20 @@ help_text()
echo
echo
echo
"If the mountpoint isn't specified, will used"
echo
"If the mountpoint isn't specified, will used"
echo
"variable DEFAULT_MOUNTPOINT from the config file
$CONFIGFILE
"
echo
"variable DEFAULT_MOUNTPOINT from the config file
$CONFIGFILE
"
echo
"(current value
of DEFAULT_MOUNTPOINT
is '
$DEFAULT_MOUNTPOINT
')."
echo
"(current value is '
$DEFAULT_MOUNTPOINT
')."
echo
echo
echo
"Report bugs to <support@etersoft.ru>."
echo
"Report bugs to <support@etersoft.ru>."
}
}
[
"
$1
"
==
'--help'
-o
"
$1
"
==
'-h'
]
&&
{
help_text
;
exit
0
;
}
[
"
$1
"
==
'--help'
-o
"
$1
"
==
'-h'
]
&&
{
help_text
;
exit
0
;
}
if
[
-z
"
$@
"
]
;
then
cat
/proc/mounts |
grep
cifs
exit
fi
# FIXME: Lav 19.02.10: I think, default mount path is useless
# FIXME: Lav 19.02.10: I think, default mount path is useless
[
"$#"
-ge
1
-a
"$#"
-le
2
]
||
fatal
'Usage: etermount <//server/share> [</path/mountpoint>]'
[
"$#"
-ge
1
-a
"$#"
-le
2
]
||
fatal
'Usage: etermount <//server/share> [</path/mountpoint>]
. Use -h or --help options for help.
'
if
[
"
$2
"
==
''
]
;
then
if
[
"
$2
"
==
''
]
;
then
SHARE_PATH
=
$DEFAULT_MOUNTPOINT
SHARE_PATH
=
$DEFAULT_MOUNTPOINT
...
@@ -74,7 +80,8 @@ fi
...
@@ -74,7 +80,8 @@ fi
create_share_dir
"
$SHARE_PATH
"
create_share_dir
"
$SHARE_PATH
"
if
$(
$SUDO
mount
-t
cifs
"
$1
"
"
$SHARE_PATH
"
-o
$MOUNT_OPTIONS
)
;
then
echo
"Mouting share
$1
to
$SHARE_PATH
with
$MOUNT_OPTIONS
options..."
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"
echo
"Info: mount of share
$1
in mountpoint
$SHARE_PATH
has been successfully"
else
else
fatal
"Warning: error while mount of share
$1
in mountpoint
$SHARE_PATH
!"
fatal
"Warning: error while mount of share
$1
in mountpoint
$SHARE_PATH
!"
...
...
etercifs/functions.sh
View file @
0db53c6b
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
PACKAGEINFO
=
@DATADIR@/package.conf
PACKAGEINFO
=
@DATADIR@/package.conf
if
[
-f
"
$PACKAGEINFO
"
]
;
then
if
[
-f
"
$PACKAGEINFO
"
]
;
then
.
$PACKAGEINFO
/package.conf
.
$PACKAGEINFO
else
else
fatal
"Not found package information file
$PACKAGEINFO
"
fatal
"Not found package information file
$PACKAGEINFO
"
fi
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