Hi,
sorry if i disturbing ;) Apropo Drak-tools ..
but if you are on the Drakstuff allreaddy, can you maby look for to be
well work drakconnect
with nmcli or maybe directly build up an an new draknet (remove my one
it's not so well)
with the draktools and the drakframework ? as suggestion can you maybe
use, as example
my draknet with dialog and xdialog ? but this maby more nice with
drakframework
(ehh or so, i think you know what i meant *g*) How ever, i have add it
as attachment.
and maby, by the way, maybe can we have an better "hosts"-file writing,
because,
the actual hostsfile-setting up it's incredible ... bad ... and the
hosts-file writing it's one of the
essentially things of the Linuxsystems to know which host's it is which !!
NFS works now really well and i am Happy about this, thanks.. no, an big
thanks for Colin !!
Colin ma' honey ! you have magic fingers ! Thank you *very big grin* !
and by the way, the IP6 for servers and others be in the draknet-script
also on it !
IF you have build up an new DrakNet for draktools,
can you ever update your gnome-netmanager
and the user of the Distro have the possible for go on
the mmc/drakconf and have easy an controll possiblity :)
and the NetworkManager, nmtui/nmcli can ever updated ..
without any troubles .. and be conform with our Distro('s)
Not they are mus adapt;adjust;customize ,
we have the possible for do it ,
because, we have it in our hands :)
i be at moment on my FileMirror http://blackysgate.net/downloads and
http://blackysgate.net/downloads/config :) it's html5 and php5 compliant ..
i work at moment on an Admin-area for configuring it.
best regards
Blacky
Am 12.03.2015 um 09:46 schrieb Tomasz Gajc:
Hi Iirc POK already merged our drakx stuff with Maggi a work on ABF in
"software" repository.
Wysłano z Samsung Grand Neo Orange Polska
_______________________________________________
OM-Cooker mailing list
[email protected]
http://ml.openmandriva.org/listinfo.cgi/om-cooker-openmandriva.org
# #!/bin/sh
if [[ $EUID -ne 0 ]]; then
echo "you must be root to use this script!"
exit 1
else
if [ -f /usr/bin/Xdialog ] ;then
#while true
# do
#while :
#do
hostnm=$(hostname)
hostaddr=$(hostname --ip-address)
#also ip6 (not used)
addrdev=$(ifconfig | grep flags | grep -v "lo" | awk -F: '{$5="lo" ; print
$1;}') #grabing the active netdevice
addr=$(ip addr show $addrdev | awk '$1 == "inet" {gsub(/\/.*$/, "", $2); print
$2}') #ip4
addresse6=$(ip addr show $addrdev | awk '$1 == "inet6" {gsub(/\/.*$/, "", $2);
print $2}') #ip6
version=2.0.1.2
versdate=2015.03.08
if [ $WINDOWID ]; then
usdialog='Xdialog'
winsize='0 0'
break
else
usdialog='dialog'
winsize='40 60'
fi
removevariables(){
unset hostaddr
unset hostalias
unset hostnm
unset addr
unset addrdev
unset addresse6
unset address
unset versdate
unset version
unset xhostnameinfo
unset usdialog
unset winsize
}
netinformation(){
hostnm=$(hostname)
addr=$(ip addr show $addrdev | awk '$1 == "inet" {gsub(/\/.*$/, "", $2); print
$2}') #ip4
xhostnameinfo=$(hostnamectl status )
$usdialog --backtitle 'draknet Center' --title 'Draknet Network Informations
Board' --msgbox "\n
\n
Hostname : $hostnm \n
\n
First Network Adapter : $addrdev \n
\n
Host ip4 Adress via ip grep&awk : $addr \n
\n
Host ip6 Adress via ip grep&awk : \n $addresse6 \n
\n
Host ip6 Adress via hostname --ip-adress: \n $hostaddr \n
\n
$xhostnameinfo \n\n draknet Version $version from $versdate \n\n
" $winsize
}
# utilitymenu.sh - A sample shell script to display menus on screen
# Store menu options selected by the user
INPUT=/tmp/menu.sh.$$
# Storage file for displaying cal and date command output
OUTPUT=/tmp/output.sh.$$
# get text editor or fall back to vi_editor
vi_editor=${EDITOR-vi}
# trap and delete temp files
trap "rm $OUTPUT; rm $INPUT; removevariables ; exit" SIGHUP SIGINT SIGTERM
hostsedit(){
dialog --clear --backtitle 'Draknet Center' --title 'Drak NetworkManager'
--menu ' You can use the UP/DOWN arrow keys, the first \n letter of
the choice as a hot key, or the \n number keys 1-9 to choose an option.
Choose the TASK' $winsize 8 \
mcedit " Edit hosts file with mcedit ? " \
vi " Edit hosts file with vi ? " \
i-vim " Edit hosts file with vim ? " \
emacs " Edit hosts file with emacs ? " \
pico " Edit hosts file with Pico ? " \
joe " Edit hosts file with joe ? " \
nano " Edit hosts file with nano ? " \
headmenu " Go To Start " 2>"${INPUT}"
eded=$(<"${INPUT}")
case $eded in
mcedit)
mcedit /etc/hosts && hostsedit
;;
vi)
vi /etc/hosts && hostsedit
;;
i-vim)
vim /etc/hosts && hostsedit
;;
emacs)
emacs /etc/hosts && hostsedit
;;
pico)
pico /etc/hosts && hostsedit
;;
joe)
joe /etc/hosts && hostsedit
;;
nano)
nano /etc/hosts && hostsedit
;;
headmenu)
draknetconf ;;
esac
}
#---------------------Setting u Hostname----------------------
sethostname(){
hostnm=$(hostname)
addr=$(ip addr show $addrdev | awk '$1 == "inet" {gsub(/\/.*$/, "", $2);
print $2}') #ip4
$usdialog --title "draknet Hostname" --backtitle "hostnamectl set-hostname
<name>" --inputbox \
"What is your Computername ? \n actual Name: $hostnm \n actual IP : $addr \n
----------------------\n hostname.domain" $winsize 2> /tmp/inputbox.tmp.$$
retval=$?
input=`cat /tmp/inputbox.tmp.$$`
rm -f /tmp/inputbox.tmp.$$
case $retval in
0)
hostnamectl set-hostname $input
hostalias=$( echo $input | awk -F. '{print $1}' )
printf "#generate by Draknet, please use draknet for configure you
Network \n[localhost] \n127.0.0.1 localhost.localdomain localhost\n # The
following lines are desirable for IPv6 capable hosts \n::1 ip6-localhost
ip6-loopback \nfe00::0 ip6-localnet \nff00::0 ip6-mcastprefix \nff02::1
ip6-allnodes \nff02::2 ip6-allrouters \nff02::3 ip6-allhosts\n[ip4adress]
\n$addr $input $hostalias " > /etc/hosts
echo "$hostalias"
unset hostalias
unset input
;;
1)
draknetconf #go back
;;
esac
draknetconf
}
#------------------------HeadProgramm-----------------------------
draknetconf(){
ERGEBNIS=$( $usdialog --stdout --backtitle "Draknet" --menu "Draknet Netowrk
Configurator" $winsize 10 \
0 "Network Informations" \
1 "Network Editor" \
2 "Setting up your Hostname" \
3 "Edit /etc/hosts" \
4 "Prompt Only : mntui-edit " \
5 "Prompt Only : mntui-connections" \
6 "Restart Network" )
case $? in
0)
case $ERGEBNIS in
0)
netinformation && draknetconf
;;
1)
if [ $WINDOWID ]; then
nm-connection-editor && draknetconf
break
else
nmtui && draknetconf
fi
;;
2)
sethostname && draknetconf
;;
3)
if [ $WINDOWID ]; then
editor /etc/hostsfile && draknetconf
break
else
hostsedit && draknetconf
fi
;;
4)
if [ $WINDOWID ]; then
$usdialog --msgbox "i told, Prompt Only !" 40 40 && draknetconf
break
else
mntui-edit && draknetconf
fi
;;
5)
if [ $WINDOWID ]; then
$usdialog --msgbox "i told, Prompt Only !" 40 40 && draknetconf
break
else
mntui-connections && draknetconf
fi
;;
6)
$usdialog --infobox "Placeholder !" 15 35 && draknetconf
;;
esac
#echo "esac-end ;)"
;;
1)
#echo "Es wurde abgebrochen"
clear
removevariables
exit
;;
esac
removevariables
exit
}
draknetconf
#done
# if temp files found, delete em
[ -f $INPUT ] && rm $INPUT
[ -f $OUTPUT ] && rm $OUTPUT
else
urpmi --auto Xdialog
draknet
fi
fi
_______________________________________________
OM-Cooker mailing list
[email protected]
http://ml.openmandriva.org/listinfo.cgi/om-cooker-openmandriva.org