Revert "yWeb: rework for basic functionality"

Your reaction to this commit were remarkable. You demanded with an
imperious kind to revert this commit. You spoke about any rules only,
and I didn't hear evidencing explanations from you.
Admittedly, my commit wasn't very pretty and not the best style because
everything was squashed in a single commit with some customizations,
but which is ultimately just a formality... that's about it, and was quite
compliant with license conditions. In additional, your name was noted on
the commit. I'm just reminding you, until a few years ago, you didn't care
about licenses. The general copyright mainly lies with yjogol and a lot of
changes of the origin yweb code has been coming in by several committers
since yweb exists. I won't judge, whether any unique selling points play a
role, but such restrictions are exactly what the license should prevent.
Especially as, many creeped in brandings in some code parts (not only yweb)
do suggest that. Besides neutralizing such things, mainly it was the
purpose to get more compatibility, even though some functionalities
were removed or switched off.

Related to yweb I have decided to take back this commit for the sake of
peace, and I hope you are happy with it. However, I still reserve to
continue using and adopting yweb.
This commit is contained in:
2022-12-06 09:40:30 +01:00
parent b18adf0375
commit 4518361d3d
125 changed files with 472 additions and 11050 deletions

View File

@@ -227,7 +227,7 @@ do_automount_getline()
do_automount_setline()
{
if ! [ -e $1 ]; then
cp /var/etc/auto.net $1
cp /etc/auto.net $1
fi
filename=$1
mountname=`echo "$2"|sed -e "s;---;;g"`
@@ -283,8 +283,7 @@ do_cmd()
# -----------------------------------------------------------
# yInstaller
# un-tar uploaded file to /tmp/y-install.
# Execute included install.sh.
# un-tar uploaded file to /tmp. Execute included install.sh
# -----------------------------------------------------------
do_installer()
{
@@ -296,16 +295,16 @@ do_installer()
if [ -s "$y_upload_file" ]
then
mkdir -p $y_path_install
cd $y_path_install
# unpack /tmp/upload.tmp
cd $y_path_tmp
tar -xf "$y_upload_file"
rm $y_upload_file
if [ -s "$y_install" ] # look for install.sh
if [ -s "$y_install" ] #look for install.sh
then
chmod 755 $y_install
o=`$y_install` # execute
rm -f $y_install # clean up
if [ -s "$y_out_html" ] # html - output?
if [ -s "$y_out_html" ] #html - output?
then
echo '<html><head>'
echo '<link rel="stylesheet" type="text/css" href="/Y_Main.css">'
@@ -337,7 +336,7 @@ do_installer()
}
# -----------------------------------------------------------
# extension Installer $1=URL
# extention Installer $1=URL
# -----------------------------------------------------------
do_ext_installer()
{
@@ -346,11 +345,10 @@ do_ext_installer()
fi
wgetlog=`wget -O $y_upload_file $1 2>&1`
if [ -s "$y_upload_file" ];then
mkdir -p $y_path_install
cd $y_path_install
cd $y_path_tmp
tar -xf "$y_upload_file"
rm $y_upload_file
if [ -s "$y_install" ] # look for install.sh
if [ -s "$y_install" ] #look for install.sh
then
chmod 755 $y_install
o=`$y_install` # execute
@@ -365,7 +363,7 @@ do_ext_installer()
do_ext_uninstaller()
{
uinst="%(CONFIGDIR)/y-ext/uninstall.sh"
uinst="%(CONFIGDIR)/ext/uninstall.sh"
if [ -e "$uinst" ]; then
chmod 755 "$uinst"
`$uinst $1_uninstall.inc`
@@ -387,11 +385,26 @@ proc()
# -----------------------------------------------------------
wol()
{
msg=`ether-wake $1`
if [ -e $y_path_sbin/ether-wake ]; then
msg=`ether-wake $1`
fi
msg="<b>Wake on LAN $1</b><br><br>$msg"
y_format_message_html
}
# -----------------------------------------------------------
# lcd shot
# $1= optionen | leer
# -----------------------------------------------------------
do_lcshot()
{
if [ -e "$y_path_varbin/lcshot" ]; then
$y_path_varbin/lcshot $*
else
$y_path_bin/lcshot $*
fi
}
# -----------------------------------------------------------
# osd shot
# $1= fbshot | grab
@@ -443,14 +456,14 @@ do_settings_backup_restore()
backup)
rm -rf $workdir
mkdir -p $workdir
backup.sh $workdir >/dev/null
$y_path_bin/backup.sh $workdir >/dev/null
filename=$(ls -1 -tr $workdir/settings_* | tail -1)
echo "$filename"
;;
restore)
if [ -s "$y_upload_file" ]
then
msg=$(restore.sh "$y_upload_file")
msg=$($y_path_bin/restore.sh "$y_upload_file")
else
msg="error: no upload file"
fi
@@ -490,10 +503,11 @@ case "$1" in
ext_installer) shift 1; do_ext_installer $* 2>&1 ;;
proc) shift 1; proc $* ;;
wol) shift 1; wol $* ;;
lcshot) shift 1; do_lcshot $* ;;
fbshot) shift 1; do_fbshot $* ;;
fbshot_clear) do_fbshot_clear ;;
screenshot_clear) do_screenshot_clear ;;
get_update_version) wget -O /tmp/version.txt "https://raw.githubusercontent.com/tuxbox-neutrino/gui-neutrino/master/data/y-web/Y_Version.txt" ;;
get_update_version) wget -q -O /tmp/version.txt "https://raw.githubusercontent.com/tuxbox-neutrino/gui-neutrino/master/data/y-web/Y_Version.txt" ;;
settings_backup_restore) shift 1; do_settings_backup_restore $* ;;
exec_cmd) shift 1; $* ;;
automount_list) shift 1; do_automount_list $* ;;
@@ -517,33 +531,27 @@ case "$1" in
fi
;;
get_extension_list)
if [ -e "$y_path_config/extensions.txt" ]
if [ -e "$y_path_config/extentions.txt" ]
then
cat $y_path_config/extensions.txt
cat $y_path_config/extentions.txt
else
cat $y_path_httpd/extensions.txt
cat $y_path_httpd/extentions.txt
fi
;;
write_extension_list)
shift 1
echo "$*" >$y_path_config/extensions.txt
echo "$*" >$y_path_config/extentions.txt
;;
url_get)
shift 1
res=`wget -O /tmp/$2 "$1" >/tmp/url.log 2>&1`
cat /tmp/$2
;;
mtd_space)
df | while read filesystem blocks used available percent mounted ; do
mtd_space|var_space)
df | while read fs rest; do
case ${fs:0:3} in
mtd)
echo "$filesystem" "$blocks" "$used" "$available" "$percent" "$mounted"
break
;;
esac
case $mounted in
"/")
echo "$filesystem" "$blocks" "$used" "$available" "$percent" "$mounted"
echo "$fs" "$rest"
break
;;
esac