deployiso: minor tweaks; don't make torrent_meta input option

This commit is contained in:
udeved 2017-02-16 16:46:04 +01:00
parent 22da95c0c6
commit b241ebf80d
4 changed files with 10 additions and 18 deletions

View file

@ -127,9 +127,6 @@ overriding
# Piece size, 2^n # Piece size, 2^n
# piece_size=21 # piece_size=21
# torrent meta comment
# torrent_meta="ManjaroLinux"
# iso mirrors # iso mirrors
# iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent') # iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent')
~~~ ~~~

View file

@ -68,7 +68,7 @@
# account=[SetUser] # account=[SetUser]
# the server project # the server project
# project="manjarolinux" # project="[SetProject]"
# set upload bandwidth limit in kB/s # set upload bandwidth limit in kB/s
# limit=100 # limit=100
@ -79,8 +79,5 @@
# Piece size, 2^n # Piece size, 2^n
# piece_size=21 # piece_size=21
# torrent meta comment
# torrent_meta="ManjaroLinux"
# iso mirrors # iso mirrors
# iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent') # iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent')

View file

@ -252,13 +252,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>torrent_meta=</varname></term>
<listitem><para>Default meta comment for the torrent.
</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>limit=</varname></term> <term><varname>limit=</varname></term>

View file

@ -264,6 +264,11 @@ get_distname(){
echo "${DISTRIB_ID%Linux}" echo "${DISTRIB_ID%Linux}"
} }
get_distid(){
source /etc/lsb-release
echo "${DISTRIB_ID}"
}
get_disturl(){ get_disturl(){
source /etc/os-release source /etc/os-release
echo "${HOME_URL}" echo "${HOME_URL}"
@ -321,7 +326,7 @@ init_deployiso(){
host="sourceforge.net" host="sourceforge.net"
[[ -z ${project} ]] && project="manjarolinux" [[ -z ${project} ]] && project="[SetProject]"
[[ -z ${account} ]] && account="[SetUser]" [[ -z ${account} ]] && account="[SetUser]"
@ -333,7 +338,7 @@ init_deployiso(){
[[ -z ${iso_mirrors[@]} ]] && iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent') [[ -z ${iso_mirrors[@]} ]] && iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent')
[[ -z ${torrent_meta} ]] && torrent_meta="ManjaroLinux" torrent_meta="$(get_distid)"
} }
load_config(){ load_config(){
@ -735,9 +740,9 @@ show_version(){
show_config(){ show_config(){
if [[ -f ${USERCONFDIR}/manjaro-tools.conf ]]; then if [[ -f ${USERCONFDIR}/manjaro-tools.conf ]]; then
msg2 "user_config: %s" "${USERCONFDIR}/manjaro-tools.conf" msg2 "config: %s" "~/.config/manjaro-tools/manjaro-tools.conf"
else else
msg2 "manjaro_tools_conf: %s" "${manjaro_tools_conf}" msg2 "config: %s" "${manjaro_tools_conf}"
fi fi
} }