diff --git a/data/login.d/10client b/data/login.d/10client index bcf9bdb..5ca8d81 100644 --- a/data/login.d/10client +++ b/data/login.d/10client @@ -15,7 +15,7 @@ env-update source /etc/profile -source /usr/share/calculate-2.2/xdm/functions +source /usr/share/calculate/xdm/functions if [ -e '/usr/bin/cl-sync' ]; then diff --git a/data/logout.d/10client b/data/logout.d/10client index e58c5ef..1aece2b 100644 --- a/data/logout.d/10client +++ b/data/logout.d/10client @@ -15,7 +15,7 @@ env-update source /etc/profile -source /usr/share/calculate-2.2/xdm/functions +source /usr/share/calculate/xdm/functions if [ -e '/usr/bin/cl-sync' ]; then diff --git a/pym/cl_client.py b/pym/cl_client.py index b9394cd..9d48f6b 100644 --- a/pym/cl_client.py +++ b/pym/cl_client.py @@ -91,7 +91,7 @@ class share(color_print): else: return dirsFiles - def printVars(self, opts): + def printVars(self, opts=["all"]): """Печать существующих переменных""" if opts == ["all"]: self.clVars.printVars() diff --git a/pym/cl_client_cmd.py b/pym/cl_client_cmd.py index 0a3053a..ab6d4f7 100644 --- a/pym/cl_client_cmd.py +++ b/pym/cl_client_cmd.py @@ -86,7 +86,7 @@ class client_cmd(share_cmd): """Проверка опций командной строки""" optionsNotDomain = self.getOptionsNotDomain(optObj) if not args: - options = optionsNotDomain + [optObj.color, optObj.vars] + options = optionsNotDomain + [optObj.color, optObj.v] if not filter(lambda x: x, options): errMsg = _("no such argument")+":"+" %s" %USAGE.split(" ")[-1] self.optobj.error(errMsg) @@ -123,4 +123,4 @@ class client_cmd(share_cmd): а так-же ввод в домен если найдено имя хоста и пароль для подключения """ - return self.logicObj.mountRemote() \ No newline at end of file + return self.logicObj.mountRemote() diff --git a/pym/cl_share_cmd.py b/pym/cl_share_cmd.py index cec0b1d..5c42fe0 100644 --- a/pym/cl_share_cmd.py +++ b/pym/cl_share_cmd.py @@ -27,9 +27,8 @@ class share_cmd(color_print, _error): """Класс общих методов обработки опций командной строки""" def printVars(self, optObj): """Печать переменных""" - if optObj.vars: - terms = optObj.vars.split(",") - self.logicObj.printVars(terms) + if optObj.v: + self.logicObj.printVars() def setVars(self, optObj): """Установка переменных""" diff --git a/scripts/cl-client b/scripts/cl-client index 1324d67..112544d 100644 --- a/scripts/cl-client +++ b/scripts/cl-client @@ -42,7 +42,7 @@ if __name__ == "__main__": # Печать переменных obj.printVars(opts) # Если нет печати переменных выполняем логику программы - if not opts.vars: + if not opts.v: if args: domainName = args[0] # Ввод в домен diff --git a/scripts/cl-passwd b/scripts/cl-passwd index ed96414..a182dc8 100644 --- a/scripts/cl-passwd +++ b/scripts/cl-passwd @@ -42,7 +42,7 @@ if __name__ == "__main__": # Печать переменных obj.printVars(opts) # Если нет печати переменных выполняем логику программы - if not opts.vars: + if not opts.v: # Изменение пароля пользователя if not obj.setUserPasswordToServer(): sys.exit(1) diff --git a/scripts/cl-sync b/scripts/cl-sync index 9cfc9c5..47f1674 100644 --- a/scripts/cl-sync +++ b/scripts/cl-sync @@ -45,7 +45,7 @@ if __name__ == "__main__": # Печать переменных obj.printVars(opts) # Если нет печати переменных выполняем логику программы - if not opts.vars: + if not opts.v: sync = not opts.nosync if opts.login: # Монтирование ресурсов и синхронизация при входе diff --git a/scripts/install b/scripts/install index fe87da2..e3d7f6f 100644 --- a/scripts/install +++ b/scripts/install @@ -42,7 +42,7 @@ if __name__ == "__main__": # Печать переменных obj.printVars(opts) # Если нет печати переменных выполняем логику программы - if not opts.vars: + if not opts.v: # Апдейт env файлов if obj.updateEnvFiles(): # Перечитывание переменные шаблонов из env файлов diff --git a/scripts/uninstall b/scripts/uninstall index 8b0aacb..2e39526 100644 --- a/scripts/uninstall +++ b/scripts/uninstall @@ -42,7 +42,7 @@ if __name__ == "__main__": # Печать переменных obj.printVars(opts) # Если нет печати переменных выполняем логику программы - if not opts.vars: + if not opts.v: # Наложение шаблонов на систему при деинсталяции if not obj.uninstallProg(): sys.exit(1) diff --git a/setup.cfg b/setup.cfg index 00b055c..a584652 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,4 +2,4 @@ install-scripts=/usr/bin install-purelib=/usr/lib/calculate-2.2 install-platlib=/usr/lib/calculate-2.2 -install-data=/usr/share/calculate-2.2/templates \ No newline at end of file +#install-data=/usr/share/calculate/templates diff --git a/setup.py b/setup.py index 1b885e2..bf31ac5 100755 --- a/setup.py +++ b/setup.py @@ -33,11 +33,11 @@ data_files = [] var_data_files = [] -data_dirs_template = ['templates'] +#data_dirs_template = ['templates'] data_dirs_share = ['i18n'] -share_calculate_dir = "/usr/share/calculate-2.2" -template_calculate_dir = os.path.join(share_calculate_dir, "templates") -template_replace_dirname = "client" +share_calculate_dir = "/usr/share/calculate" +#template_calculate_dir = os.path.join(share_calculate_dir, "templates") +#template_replace_dirname = "client" def __scanDir(scanDir, prefix, replace_dirname, dirData, flagDir=False): """Scan directory""" @@ -70,23 +70,23 @@ def create_data_files(data_dirs, prefix="", replace_dirname=""): data_files += __scanDir(data_dir, prefix, replace_dirname, data) return data_files -data_files += create_data_files (data_dirs_template, template_calculate_dir, - template_replace_dirname) +#data_files += create_data_files (data_dirs_template, template_calculate_dir, +# template_replace_dirname) data_files += create_data_files (data_dirs_share, share_calculate_dir) data_files += [('/etc/init.d', ['data/client'])] -data_files += [('/usr/share/calculate-2.2/xdm/login.d', +data_files += [('/usr/share/calculate/xdm/login.d', ['data/login.d/10client'])] +\ - [('/usr/share/calculate-2.2/xdm/logout.d', + [('/usr/share/calculate/xdm/logout.d', ['data/logout.d/10client'])] +\ - [('/usr/share/calculate-2.2/xdm/',['data/wait_domain'])] +\ - [('/var/calculate/templates', [])] + [('/usr/share/calculate/xdm/',['data/wait_domain'])] +# [('/var/calculate/templates', [])] class cl_install_data(install_data): def run (self): install_data.run(self) data_file = [("/etc/init.d/client",0755), - ("/usr/share/calculate-2.2/xdm/wait_domain",0755)] + ("/usr/share/calculate/xdm/wait_domain",0755)] fileNames = map(lambda x: os.path.split(x[0])[1], data_file) listNames = map(lambda x: filter(lambda y: y, x[0].split("/")),data_file) data_find = {} diff --git a/templates/.calculate_directory b/templates/.calculate_directory deleted file mode 100644 index ac25d9c..0000000 --- a/templates/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate append=skip cl_name==calculate-client \ No newline at end of file diff --git a/templates/domain/.calculate_directory b/templates/domain/.calculate_directory deleted file mode 100644 index 30ea2e9..0000000 --- a/templates/domain/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate append=skip cl_pass_action==domain&&os_remote_auth!= \ No newline at end of file diff --git a/templates/domain/gdm/.calculate_directory b/templates/domain/gdm/.calculate_directory deleted file mode 100644 index 256a736..0000000 --- a/templates/domain/gdm/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!=&&pkg(gnome-base/gdm)!= append=skip \ No newline at end of file diff --git a/templates/domain/gdm/Init/.calculate_directory b/templates/domain/gdm/Init/.calculate_directory deleted file mode 100644 index a53849b..0000000 --- a/templates/domain/gdm/Init/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate path=/etc/X11/gdm \ No newline at end of file diff --git a/templates/domain/gdm/Init/00Default b/templates/domain/gdm/Init/00Default deleted file mode 100644 index 6a79670..0000000 --- a/templates/domain/gdm/Init/00Default +++ /dev/null @@ -1 +0,0 @@ -# Calculate name=Default.old link=/etc/X11/gdm/Init/Default mirror load(/etc/X11/gdm/Init/Default.old)== diff --git a/templates/domain/gdm/Init/05Default b/templates/domain/gdm/Init/05Default deleted file mode 100644 index 562f961..0000000 --- a/templates/domain/gdm/Init/05Default +++ /dev/null @@ -1,6 +0,0 @@ -# Calculate chmod=755 name=Default -#!/bin/bash - -/usr/share/calculate-2.2/xdm/wait_domain -OLDDEFAULT=/etc/X11/gdm/Init/Default.old -[[ -f $OLDDEFAULT ]] && source $OLDDEFAULT diff --git a/templates/domain/gdm/custom.conf b/templates/domain/gdm/custom.conf deleted file mode 100644 index 29af3c9..0000000 --- a/templates/domain/gdm/custom.conf +++ /dev/null @@ -1,4 +0,0 @@ -# Calculate format=kde path=/etc/X11/gdm - -[greeter] -MinimalUID=1000 diff --git a/templates/domain/glibc/.calculate_directory b/templates/domain/glibc/.calculate_directory deleted file mode 100644 index 4be74c1..0000000 --- a/templates/domain/glibc/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!= append=skip \ No newline at end of file diff --git a/templates/domain/glibc/nsswitch.conf b/templates/domain/glibc/nsswitch.conf deleted file mode 100644 index a9f05a6..0000000 --- a/templates/domain/glibc/nsswitch.conf +++ /dev/null @@ -1,19 +0,0 @@ -# Calculate format=ldap append=replace chmod=0644 chown=root:root path=/etc -passwd: files ldap -shadow: files ldap -group: files ldap - -hosts: files dns -networks: files dns - -services: files ldap -protocols: files ldap -rpc: db files -ethers: db files -netmasks: files -netgroup: files ldap -bootparams: files - -automount: files ldap -aliases: files - diff --git a/templates/domain/kdm/.calculate_directory b/templates/domain/kdm/.calculate_directory deleted file mode 100644 index 90c5ca4..0000000 --- a/templates/domain/kdm/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!=&&pkg(kde-base/kdm)!= append=skip \ No newline at end of file diff --git a/templates/domain/kdm/kdmrc b/templates/domain/kdm/kdmrc deleted file mode 100644 index 985aaa7..0000000 --- a/templates/domain/kdm/kdmrc +++ /dev/null @@ -1,10 +0,0 @@ -# Calculate format=kde path=/usr/share/config/kdm -[X-*-Core] -Setup=/usr/share/calculate-2.2/xdm/wait_domain -[X-*-Greeter] -#?env(unix.sr_unix_min_id)!=# -MinShowUID=#-env(unix.sr_unix_min_id)-# -#env# -#?env(unix.sr_unix_min_id)==# -MinShowUID=1000 -#env# diff --git a/templates/domain/nss_ldap/.calculate_directory b/templates/domain/nss_ldap/.calculate_directory deleted file mode 100644 index 4be74c1..0000000 --- a/templates/domain/nss_ldap/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!= append=skip \ No newline at end of file diff --git a/templates/domain/nss_ldap/ldap.conf b/templates/domain/nss_ldap/ldap.conf deleted file mode 100644 index a47e951..0000000 --- a/templates/domain/nss_ldap/ldap.conf +++ /dev/null @@ -1,18 +0,0 @@ -# Calculate format=ldap append=replace chmod=0644 chown=root:root path=/etc -host #-cl_remote_host-# -base #-server(ldap.services_dn)-# -rootbinddn #-server(unix.dn)-# -binddn #-server(unix.bind_dn)-# -bindpw #-server(unix.bind_pw)-# -port 389 -ldap_version 3 -bind_policy soft - -#ускорим ограничив область поиска -nss_base_passwd ou=Users,#-server(unix.dn)-#?one?shadowFlag=1 -nss_base_shadow ou=Users,#-server(unix.dn)-#?one?shadowFlag=1 -nss_base_group ou=Groups,#-server(unix.dn)-#?one -#?server(samba.dn)!=# -nss_base_group ou=Groups,#-server(samba.dn)-#?one -#server# - diff --git a/templates/domain/openssh/.calculate_directory b/templates/domain/openssh/.calculate_directory deleted file mode 100644 index 4be74c1..0000000 --- a/templates/domain/openssh/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!= append=skip \ No newline at end of file diff --git a/templates/domain/openssh/ssh_config b/templates/domain/openssh/ssh_config deleted file mode 100644 index a10a39b..0000000 --- a/templates/domain/openssh/ssh_config +++ /dev/null @@ -1,2 +0,0 @@ -# Calculate path=/etc/ssh -StrictHostKeyChecking=no diff --git a/templates/domain/pambase/.calculate_directory b/templates/domain/pambase/.calculate_directory deleted file mode 100644 index 4be74c1..0000000 --- a/templates/domain/pambase/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!= append=skip \ No newline at end of file diff --git a/templates/domain/pambase/system-auth b/templates/domain/pambase/system-auth deleted file mode 100644 index 9464000..0000000 --- a/templates/domain/pambase/system-auth +++ /dev/null @@ -1,18 +0,0 @@ -# Calculate format=ldap append=replace chmod=0644 chown=root:root path=/etc/pam.d -auth required pam_env.so -auth optional pam_keystore.so -auth sufficient pam_unix.so use_first_pass -auth sufficient pam_ldap.so use_first_pass -auth required pam_deny.so - -account required pam_unix.so -account sufficient pam_ldap.so - -password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3 -password sufficient pam_unix.so nullok md5 shadow use_authtok -password sufficient pam_ldap.so -password required pam_deny.so - -session required pam_limits.so -session required pam_unix.so -session optional pam_ldap.so diff --git a/templates/domain/xfdesktop/.calculate_directory b/templates/domain/xfdesktop/.calculate_directory deleted file mode 100644 index 67daf21..0000000 --- a/templates/domain/xfdesktop/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!=&&pkg(xfce-base/xfdesktop)!= append=skip \ No newline at end of file diff --git a/templates/domain/xfdesktop/kioskrc b/templates/domain/xfdesktop/kioskrc deleted file mode 100644 index 37dc973..0000000 --- a/templates/domain/xfdesktop/kioskrc +++ /dev/null @@ -1,4 +0,0 @@ -# Calculate format=samba path=/etc/xdg/xfce4/kiosk - -[xfce4-session] -Shutdown=NONE diff --git a/templates/undomain/.calculate_directory b/templates/undomain/.calculate_directory deleted file mode 100644 index ff923d4..0000000 --- a/templates/undomain/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate append=skip cl_pass_action==undomain \ No newline at end of file diff --git a/templates/undomain/gdm/.calculate_directory b/templates/undomain/gdm/.calculate_directory deleted file mode 100644 index eec4060..0000000 --- a/templates/undomain/gdm/.calculate_directory +++ /dev/null @@ -1,2 +0,0 @@ -# Calculate belong()!=&&pkg(gnome-base/gdm)!= append=skip - diff --git a/templates/undomain/gdm/Init/.calculate_directory b/templates/undomain/gdm/Init/.calculate_directory deleted file mode 100644 index a53849b..0000000 --- a/templates/undomain/gdm/Init/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate path=/etc/X11/gdm \ No newline at end of file diff --git a/templates/undomain/gdm/Init/00Default b/templates/undomain/gdm/Init/00Default deleted file mode 100644 index 5836c6b..0000000 --- a/templates/undomain/gdm/Init/00Default +++ /dev/null @@ -1 +0,0 @@ -# Calculate name=Default link=/etc/X11/gdm/Init/Default.old mirror load(/etc/X11/gdm/Init/Default.old)!= diff --git a/templates/undomain/gdm/Init/05Default b/templates/undomain/gdm/Init/05Default deleted file mode 100644 index 0d4babc..0000000 --- a/templates/undomain/gdm/Init/05Default +++ /dev/null @@ -1 +0,0 @@ -# Calculate append=remove name=Default.old diff --git a/templates/undomain/gdm/custom.conf b/templates/undomain/gdm/custom.conf deleted file mode 100644 index fc212f7..0000000 --- a/templates/undomain/gdm/custom.conf +++ /dev/null @@ -1,4 +0,0 @@ -# Calculate format=kde path=/etc/X11/gdm - -[greeter] -MinimalUID=999 diff --git a/templates/undomain/glibs/.calculate_directory b/templates/undomain/glibs/.calculate_directory deleted file mode 100644 index 4be74c1..0000000 --- a/templates/undomain/glibs/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!= append=skip \ No newline at end of file diff --git a/templates/undomain/glibs/nsswitch.conf b/templates/undomain/glibs/nsswitch.conf deleted file mode 100644 index 8abbbe5..0000000 --- a/templates/undomain/glibs/nsswitch.conf +++ /dev/null @@ -1,23 +0,0 @@ -# Calculate format=ldap append=replace chmod=0644 chown=root:root path=/etc -passwd: compat -shadow: compat -group: compat - -# passwd: db files nis -# shadow: db files nis -# group: db files nis - -hosts: files dns -networks: files dns - -services: db files -protocols: db files -rpc: db files -ethers: db files -netmasks: files -netgroup: files -bootparams: files - -automount: files -aliases: files - diff --git a/templates/undomain/kdm/.calculate_directory b/templates/undomain/kdm/.calculate_directory deleted file mode 100644 index 90c5ca4..0000000 --- a/templates/undomain/kdm/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!=&&pkg(kde-base/kdm)!= append=skip \ No newline at end of file diff --git a/templates/undomain/kdm/kdmrc b/templates/undomain/kdm/kdmrc deleted file mode 100644 index 6ba4e54..0000000 --- a/templates/undomain/kdm/kdmrc +++ /dev/null @@ -1,5 +0,0 @@ -# Calculate format=kde pkg(kde-base/kdm)!= path=/usr/share/config/kdm -[X-*-Core] -Setup=/usr/share/config/kdm/Xsetup -[X-*-Greeter] -MinShowUID=1000 diff --git a/templates/undomain/nss_ldap/.calculate_directory b/templates/undomain/nss_ldap/.calculate_directory deleted file mode 100644 index 4be74c1..0000000 --- a/templates/undomain/nss_ldap/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!= append=skip \ No newline at end of file diff --git a/templates/undomain/nss_ldap/ldap.conf b/templates/undomain/nss_ldap/ldap.conf deleted file mode 100644 index f7c3d20..0000000 --- a/templates/undomain/nss_ldap/ldap.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Calculate format=ldap append=replace chmod=0644 chown=root:root path=/etc - diff --git a/templates/undomain/openssh/.calculate_directory b/templates/undomain/openssh/.calculate_directory deleted file mode 100644 index 4be74c1..0000000 --- a/templates/undomain/openssh/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!= append=skip \ No newline at end of file diff --git a/templates/undomain/openssh/ssh_config b/templates/undomain/openssh/ssh_config deleted file mode 100644 index a10a39b..0000000 --- a/templates/undomain/openssh/ssh_config +++ /dev/null @@ -1,2 +0,0 @@ -# Calculate path=/etc/ssh -StrictHostKeyChecking=no diff --git a/templates/undomain/pambase/.calculate_directory b/templates/undomain/pambase/.calculate_directory deleted file mode 100644 index 4be74c1..0000000 --- a/templates/undomain/pambase/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!= append=skip \ No newline at end of file diff --git a/templates/undomain/pambase/system-auth b/templates/undomain/pambase/system-auth deleted file mode 100644 index e545340..0000000 --- a/templates/undomain/pambase/system-auth +++ /dev/null @@ -1,14 +0,0 @@ -# Calculate format=ldap append=replace chmod=0644 chown=root:root path=/etc/pam.d -auth required pam_env.so -auth sufficient pam_unix.so -auth required pam_deny.so - -account required pam_unix.so - -password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3 -password sufficient pam_unix.so nullok md5 shadow use_authtok -password required pam_deny.so - -session required pam_limits.so -session required pam_unix.so - diff --git a/templates/undomain/xfdesktop/.calculate_directory b/templates/undomain/xfdesktop/.calculate_directory deleted file mode 100644 index 67daf21..0000000 --- a/templates/undomain/xfdesktop/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate belong()!=&&pkg(xfce-base/xfdesktop)!= append=skip \ No newline at end of file diff --git a/templates/undomain/xfdesktop/kioskrc b/templates/undomain/xfdesktop/kioskrc deleted file mode 100644 index aed65cc..0000000 --- a/templates/undomain/xfdesktop/kioskrc +++ /dev/null @@ -1,4 +0,0 @@ -# Calculate format=samba path=/etc/xdg/xfce4/kiosk - -[xfce4-session] -!Shutdown=