Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
s3-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
s3-conf
Commits
ae1aca86
Commit
ae1aca86
authored
Apr 25, 2025
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parents
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
0 deletions
+77
-0
Makefile
Makefile
+13
-0
s3
s3
+64
-0
No files found.
Makefile
0 → 100644
View file @
ae1aca86
all
:
s3-config
@
echo
"
$$
S3_CONFIG"
>
/etc/config/s3
install
-v
-Dm755
s3 /usr/share/easycwmp/functions
s3-config
:
define
S3_CONFIG
config
s3
'credentials'
option
uri
''
option
accesskey
''
option
secretkey
''
endef
export
S3_CONFIG
s3
0 → 100755
View file @
ae1aca86
#!/bin/sh
#common_execute_method_param "$parameter" "$permission" "$get_cmd" "$set_cmd" "xsd:$type" "$forcedinform"
# $forcedinform should be set to 1 if the parameter is included in the inform message otherwise empty
# Default of $type = string
#############################
# Entry point functuons #
#############################
prefix_list
=
"
$prefix_list
$DMROOT
.S3."
entry_execute_method_list
=
"
$entry_execute_method_list
entry_execute_method_root_S3"
entry_execute_method_list_forcedinform
=
"
$entry_execute_method_list_forcedinform
entry_execute_method_root_S3"
entry_execute_method_root_S3
()
{
case
"
$1
"
in
""
|
"
$DMROOT
."
|
"
$DMROOT
.S3."
*
)
common_execute_method_obj
"
$DMROOT
.S3."
"0"
common_execute_method_param
"
$DMROOT
.S3.URI"
"1"
"s3_get_uri"
"s3_set_uri"
common_execute_method_param
"
$DMROOT
.S3.AccessKey"
"1"
"s3_get_accesskey"
"s3_set_accesskey"
common_execute_method_param
"
$DMROOT
.S3.SecretKey"
"1"
""
"s3_set_secretkey"
return
0
;
;;
esac
return
$E_INVALID_PARAMETER_NAME
;
}
#######################################
# Data model parameters functions #
#######################################
s3_get_uri
()
{
echo
`
$UCI_GET
s3.credentials.uri
`
}
s3_set_uri
()
{
local
uri
=
`
$UCI_GET
s3.credentials.uri
`
if
[
"
$uri
"
!=
"
$1
"
]
;
then
$UCI_SET
s3.credentials.uri
=
"
$1
"
$UCI_COMMIT
chmod
a+r /etc/config/s3
fi
}
s3_get_accesskey
()
{
echo
`
$UCI_GET
s3.credentials.accesskey
`
}
s3_set_accesskey
()
{
local
accesskey
=
`
$UCI_GET
s3.credentials.accesskey
`
if
[
"
$accesskey
"
!=
"
$1
"
]
;
then
$UCI_SET
s3.credentials.accesskey
=
"
$1
"
$UCI_COMMIT
chmod
a+r /etc/config/s3
fi
}
s3_set_secretkey
()
{
local
secretkey
=
`
$UCI_GET
s3.credentials.secretkey
`
if
[
"
$secretkey
"
!=
"
$1
"
]
;
then
$UCI_SET
s3.credentials.secretkey
=
"
$1
"
$UCI_COMMIT
chmod
a+r /etc/config/s3
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