initial
After Width: | Height: | Size: 1.2 MiB |
After Width: | Height: | Size: 2.3 MiB |
After Width: | Height: | Size: 2.0 MiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 1.9 MiB |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 2.8 MiB |
After Width: | Height: | Size: 908 KiB |
After Width: | Height: | Size: 2.9 MiB |
After Width: | Height: | Size: 2.8 MiB |
After Width: | Height: | Size: 3.4 MiB |
After Width: | Height: | Size: 18 KiB |
|
@ -0,0 +1,4 @@
|
|||
include menu.cfg
|
||||
default vesamenu.c32
|
||||
prompt 0
|
||||
timeout 0
|
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1,9 @@
|
|||
default 0
|
||||
color cyan/blue white/blue
|
||||
splashimage /boot/grub/splash.xpm.gz
|
||||
|
||||
LINUX_LIVE
|
||||
|
||||
LINUX_INSTALL
|
||||
|
||||
MEMTEST
|
|
@ -0,0 +1,16 @@
|
|||
set default=0
|
||||
|
||||
loadfont $prefix/dejavu-bold-16.pf2
|
||||
loadfont $prefix/dejavu-bold-14.pf2
|
||||
loadfont $prefix/unicode.pf2
|
||||
set gfxmode=auto
|
||||
insmod all_video
|
||||
insmod gfxterm
|
||||
insmod png
|
||||
|
||||
source /boot/grub/theme.cfg
|
||||
|
||||
terminal_output gfxterm
|
||||
|
||||
insmod play
|
||||
play 960 440 1 0 4 440 1
|
|
@ -0,0 +1,33 @@
|
|||
source /boot/grub/config.cfg
|
||||
|
||||
# Installer (if any)
|
||||
if @ENABLE_INSTALL_MENU@; then
|
||||
|
||||
source /boot/grub/install_start.cfg
|
||||
|
||||
submenu 'Расширенные опции установки...' --hotkey=a {
|
||||
|
||||
source /boot/grub/theme.cfg
|
||||
|
||||
source /boot/grub/install.cfg
|
||||
|
||||
}
|
||||
fi
|
||||
|
||||
submenu 'Утилиты...' --hotkey=u {
|
||||
|
||||
source /boot/grub/theme.cfg
|
||||
|
||||
# Memtest (if any)
|
||||
if [ "${grub_platform}" = "pc" ] -a @ENABLE_MEMTEST@; then
|
||||
source /boot/grub/memtest.cfg
|
||||
fi
|
||||
|
||||
# Firmware setup (UEFI)
|
||||
if [ "${grub_platform}" = "efi" ]; then
|
||||
menuentry "UEFI Firmware Settings" {
|
||||
fwsetup
|
||||
}
|
||||
fi
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
submenu 'Графическая установка...' --hotkey=g {
|
||||
|
||||
source /boot/grub/theme.cfg
|
||||
|
||||
menuentry 'Установка' --hotkey=i {
|
||||
linux @KERNEL_GI@ vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_GI@
|
||||
}
|
||||
|
||||
menuentry 'Расширенная установка' --hotkey=x {
|
||||
linux @KERNEL_GI@ priority=low vga=788 @APPEND_INSTALL@
|
||||
initrd @INITRD_GI@
|
||||
}
|
||||
|
||||
menuentry 'Автоматическая установка' --hotkey=a {
|
||||
linux @KERNEL_GI@ auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_GI@
|
||||
}
|
||||
|
||||
menuentry 'Режим восстановления' --hotkey=r {
|
||||
linux @KERNEL_GI@ rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_GI@
|
||||
}
|
||||
}
|
||||
|
||||
submenu 'Текстовая установка...' --hotkey=t {
|
||||
|
||||
source /boot/grub/theme.cfg
|
||||
|
||||
menuentry 'Установка' --hotkey=i {
|
||||
linux @KERNEL_DI@ vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_DI@
|
||||
}
|
||||
|
||||
menuentry 'Расширенная установка' --hotkey=x {
|
||||
linux @KERNEL_DI@ priority=low vga=788 @APPEND_INSTALL@
|
||||
initrd @INITRD_DI@
|
||||
}
|
||||
|
||||
menuentry 'Автоматическая установка' --hotkey=a {
|
||||
linux @KERNEL_DI@ auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_DI@
|
||||
}
|
||||
|
||||
menuentry 'Режим восстановления' --hotkey=r {
|
||||
linux @KERNEL_DI@ rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_DI@
|
||||
}
|
||||
}
|
||||
|
||||
submenu 'Установка с голосовым ассистентом...' --hotkey=s {
|
||||
|
||||
source /boot/grub/theme.cfg
|
||||
|
||||
menuentry 'Установка' --hotkey=i {
|
||||
linux @KERNEL_GI@ speakup.synth=soft vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_GI@
|
||||
}
|
||||
|
||||
menuentry 'Расширенная установка' --hotkey=x {
|
||||
linux @KERNEL_GI@ speakup.synth=soft priority=low vga=788 @APPEND_INSTALL@
|
||||
initrd @INITRD_GI@
|
||||
}
|
||||
|
||||
menuentry 'Автоматическая установка' --hotkey=a {
|
||||
linux @KERNEL_GI@ speakup.synth=soft auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_GI@
|
||||
}
|
||||
|
||||
menuentry 'Режим восстановления' --hotkey=r {
|
||||
linux @KERNEL_GI@ speakup.synth=soft rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_GI@
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
menuentry 'Начать установку' --hotkey=i {
|
||||
linux @KERNEL_GI@ vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_GI@
|
||||
}
|
||||
|
||||
menuentry 'Начать установку с голосовым ассистентом' --hotkey=s {
|
||||
linux @KERNEL_GI@ speakup.synth=soft vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_GI@
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
menuentry 'Начать установку' --hotkey=i {
|
||||
linux @KERNEL_DI@ vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_DI@
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
submenu 'Текстовая установка...' --hotkey=t {
|
||||
|
||||
source /boot/grub/theme.cfg
|
||||
|
||||
menuentry 'Установка' --hotkey=i {
|
||||
linux @KERNEL_DI@ vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_DI@
|
||||
}
|
||||
|
||||
menuentry 'Расширенная установка' --hotkey=x {
|
||||
linux @KERNEL_DI@ priority=low vga=788 @APPEND_INSTALL@
|
||||
initrd @INITRD_DI@
|
||||
}
|
||||
|
||||
menuentry 'Автоматическая установка' --hotkey=a {
|
||||
linux @KERNEL_DI@ auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_DI@
|
||||
}
|
||||
|
||||
menuentry 'Режим восстановления' --hotkey=r {
|
||||
linux @KERNEL_DI@ rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
|
||||
initrd @INITRD_DI@
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
desktop-image: "../splash.png"
|
||||
title-color: "#ffffff"
|
||||
title-font: "DejaVu Sans Bold 16"
|
||||
title-text: "Меню установки ОСГОС"
|
||||
message-font: "Unifont Regular 16"
|
||||
terminal-font: "Unifont Regular 16"
|
||||
|
||||
#help bar at the bottom
|
||||
+ label {
|
||||
top = 100%-50
|
||||
left = 0
|
||||
width = 100%
|
||||
height = 20
|
||||
text = "@KEYMAP_SHORT@"
|
||||
align = "center"
|
||||
color = "#0B3534"
|
||||
font = "DejaVu Sans Bold 14"
|
||||
}
|
||||
|
||||
#boot menu
|
||||
+ boot_menu {
|
||||
left = 10%
|
||||
width = 80%
|
||||
top = 52%
|
||||
height = 48%-80
|
||||
item_color = "#ffffff"
|
||||
item_font = "DejaVu Sans Bold 14"
|
||||
selected_item_color= "#006565"
|
||||
selected_item_font = "DejaVu Sans Bold 14"
|
||||
item_height = 16
|
||||
item_padding = 0
|
||||
item_spacing = 4
|
||||
icon_width = 0
|
||||
icon_heigh = 0
|
||||
item_icon_space = 0
|
||||
}
|
||||
|
||||
#progress bar
|
||||
+ progress_bar {
|
||||
id = "__timeout__"
|
||||
left = 15%
|
||||
top = 100%-80
|
||||
height = 16
|
||||
width = 70%
|
||||
font = "DejaVu Sans Regular 14"
|
||||
text_color = "#000000"
|
||||
fg_color = "#ffffff"
|
||||
bg_color = "#a8a8a8"
|
||||
border_color = "#ffffff"
|
||||
text = "@TIMEOUT_NOTIFICATION_LONG@"
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
menuentry "Утилита диагностики памяти (@MEMTEST_VERSION@)" --hotkey=m {
|
||||
linux16 @MEMTEST_BIN@
|
||||
}
|
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1,13 @@
|
|||
set color_normal=light-gray/black
|
||||
set color_highlight=white/dark-gray
|
||||
|
||||
if [ -e /isolinux/splash.png ]; then
|
||||
# binary_syslinux modifies the theme file to point to the correct
|
||||
# background picture
|
||||
set theme=/boot/grub/live-theme/theme.txt
|
||||
elif [ -e /boot/grub/splash.png ]; then
|
||||
set theme=/boot/grub/live-theme/theme.txt
|
||||
else
|
||||
set menu_color_normal=cyan/blue
|
||||
set menu_color_highlight=white/blue
|
||||
fi
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/ISOLINUX/isolinux.bin
|
|
@ -0,0 +1,4 @@
|
|||
include menu.cfg
|
||||
default vesamenu.c32
|
||||
prompt 0
|
||||
timeout 0
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/syslinux/modules/bios/ldlinux.c32
|
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1 @@
|
|||
/usr/lib/syslinux/modules/bios/ldlinux.c32
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/PXELINUX/pxelinux.0
|
|
@ -0,0 +1,4 @@
|
|||
include menu.cfg
|
||||
default vesamenu.c32
|
||||
prompt 0
|
||||
timeout 0
|
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1,4 @@
|
|||
include menu.cfg
|
||||
default vesamenu.c32
|
||||
prompt 0
|
||||
timeout 0
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/syslinux/modules/bios/hdt.c32
|
|
@ -0,0 +1,185 @@
|
|||
label installstart
|
||||
menu label ‡ ¯ãáâ¨âì ^ãáâ ®¢ªã
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append vga=788 @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label installstartspeech
|
||||
menu label ‡ ¯ãáâ¨âì ãáâ ®¢ªã á ^£®«®á®¢ë¬ áá¨áâ¥â®¬
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append speakup.synth=soft vga=788 @APPEND_INSTALL@ --- quiet
|
||||
|
||||
menu begin install
|
||||
menu label ^„®¯®«¨â¥«ìë¥ ®¯æ¨¨ ãáâ ®¢ª¨
|
||||
menu title „®¯®«¨â¥«ìë¥ ®¯æ¨¨ ãáâ ®¢ª¨
|
||||
include stdmenu.cfg
|
||||
label mainmenu
|
||||
menu label ^<5E> § ¤..
|
||||
menu exit
|
||||
|
||||
menu begin graphicalinstall
|
||||
menu label ^ƒà ä¨ç¥áª ï ãáâ ®¢ª
|
||||
menu title ƒà ä¨ç¥áª ï ãáâ ®¢ª
|
||||
include stdmenu.cfg
|
||||
label mainmenu
|
||||
menu label ^<5E> § ¤..
|
||||
menu exit
|
||||
|
||||
label installgui
|
||||
menu label ^“áâ ®¢ª
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append vga=788 @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label expertgui
|
||||
menu label ^<5E>ªá¯¥àâ ï ãáâ ®¢ª
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append priority=low vga=788 @APPEND_INSTALL@
|
||||
|
||||
label autogui
|
||||
menu label ^€¢â®¬ â¨ç¥áª ï ãáâ ®¢ª
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label rescuegui
|
||||
menu label ^<5E>¥¦¨¬ ¢®ááâ ®¢«¥¨ï
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
|
||||
menu end
|
||||
|
||||
menu begin textinstall
|
||||
menu label ’¥ªá⮢ ï ^ãáâ ®¢ª
|
||||
menu title ’¥ªá⮢ ï ãáâ ®¢ª
|
||||
include stdmenu.cfg
|
||||
label mainmenu
|
||||
menu label ^<5E> § ¤..
|
||||
menu exit
|
||||
|
||||
label install
|
||||
menu label ^“áâ ®¢ª
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append vga=788 @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label expert
|
||||
menu label ^<5E>ªá¯¥àâ ï ãáâ ®¢ª
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append priority=low vga=788 @APPEND_INSTALL@
|
||||
|
||||
label auto
|
||||
menu label ^€¢â®¬ â¨ç¥áª ï ãáâ ®¢ª
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label rescue
|
||||
menu label ^<5E>¥¦¨¬ ¢®ááâ ®¢«¥¨ï
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
|
||||
menu end
|
||||
|
||||
menu begin graphicalinstalldark
|
||||
menu label ƒà ä¨ç¥áª ï ãáâ ®¢ª ¢ ^⥬®¬ ®ä®à¬«¥¨¨
|
||||
menu title ƒà ä¨ç¥áª ï ãáâ ®¢ª ¢ ⥬®¬ ®ä®à¬«¥¨¨
|
||||
include stdmenu.cfg
|
||||
label mainmenu
|
||||
menu label ^<5E> § ¤..
|
||||
menu exit
|
||||
|
||||
label darkinstallgui
|
||||
menu label ^“áâ ®¢ª
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append vga=788 theme=dark @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label darkexpertgui
|
||||
menu label ^<5E>ªá¯¥àâ ï ãáâ ®¢ª
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append priority=low vga=788 theme=dark @APPEND_INSTALL@
|
||||
|
||||
label darkautogui
|
||||
menu label ^€¢â®¬ â¨ç¥áª ï ãáâ ®¢ª
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append auto=true priority=critical vga=788 theme=dark @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label darkrescuegui
|
||||
menu label ^<5E>¥¦¨¬ ¢®ááâ ®¢«¥¨ï
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append rescue/enable=true vga=788 theme=dark @APPEND_INSTALL@ --- quiet
|
||||
menu end
|
||||
|
||||
menu begin textinstalldark
|
||||
menu label ’¥ªá⮢ ï ãáâ ®¢ª ¢ ⥬®¬ ®ä®à¬«¥¨¨
|
||||
menu title ’¥ªá⮢ ï ãáâ ®¢ª ¢ ⥬®¬ ^®ä®à¬«¥¨¨
|
||||
include stdmenu.cfg
|
||||
label mainmenu
|
||||
menu label ^<5E> § ¤..
|
||||
menu exit
|
||||
|
||||
label darkinstall
|
||||
menu label ^“áâ ®¢ª
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append vga=788 theme=dark @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label darkexpert
|
||||
menu label ^<5E>ªá¯¥àâ ï ãáâ ®¢ª
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append priority=low vga=788 theme=dark @APPEND_INSTALL@
|
||||
|
||||
label darkauto
|
||||
menu label ^€¢â®¬ â¨ç¥áª ï ãáâ ®¢ª
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append auto=true priority=critical vga=788 theme=dark @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label darkrescue
|
||||
menu label ^<5E>¥¦¨¬ ¢®ááâ ®¢«¥¨ï
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append rescue/enable=true vga=788 theme=dark @APPEND_INSTALL@ --- quiet
|
||||
menu end
|
||||
|
||||
menu begin speechinstall
|
||||
menu label “áâ ®¢ª á £®«®á®¢ë¬ ^ áá¨áâ¥â®¬
|
||||
menu title “áâ ®¢ª á £®«®á®¢ë¬ áá¨áâ¥â®¬
|
||||
include stdmenu.cfg
|
||||
label mainmenu
|
||||
menu label ^<5E> § ¤..
|
||||
menu exit
|
||||
|
||||
label installspeechsynth
|
||||
menu label ^“áâ ®¢ª
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append speakup.synth=soft vga=788 @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label expertguispeech
|
||||
menu label ^<5E>ªá¯¥àâ ï ãáâ ®¢ª
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append speakup.synth=soft priority=low vga=788 @APPEND_INSTALL@
|
||||
|
||||
label autoguispeech
|
||||
menu label ^€¢â®¬ â¨ç¥áª ï ãáâ ®¢ª
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append speakup.synth=soft auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label rescueguispeech
|
||||
menu label ^<5E>¥¦¨¬ ¢®ááâ ®¢«¥¨ï
|
||||
linux @KERNEL_GI@
|
||||
initrd @INITRD_GI@
|
||||
append speakup.synth=soft rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
|
||||
menu end
|
||||
menu end
|
|
@ -0,0 +1,80 @@
|
|||
label installstart
|
||||
menu label ‡ ¯ãáâ¨âì ^ãáâ ®¢ªã
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append vga=788 @APPEND_INSTALL@ --- quiet
|
||||
|
||||
menu begin install
|
||||
menu label ^„®¯®«¨â¥«ìë¥ ®¯æ¨¨ ãáâ ®¢ª¨
|
||||
menu title „®¯®«¨â¥«ìë¥ ®¯æ¨¨ ãáâ ®¢ª¨
|
||||
include stdmenu.cfg
|
||||
label mainmenu
|
||||
menu label ^<5E> § ¤..
|
||||
menu exit
|
||||
|
||||
menu begin textinstall
|
||||
menu label ^’¥ªá⮢ ï ãáâ ®¢ª
|
||||
menu title ’¥ªá⮢ ï ãáâ ®¢ª
|
||||
include stdmenu.cfg
|
||||
label mainmenu
|
||||
menu label ^<5E> § ¤..
|
||||
menu exit
|
||||
|
||||
label install
|
||||
menu label ^“áâ ®¢ª
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append vga=788 @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label expert
|
||||
menu label ^<5E>ªá¯¥àâ ï ãáâ ®¢ª
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append priority=low vga=788 @APPEND_INSTALL@
|
||||
|
||||
label auto
|
||||
menu label ^€¢â®¬ â¨ç¥áª ï ãáâ ®¢ª
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label rescue
|
||||
menu label ^<5E>¥¦¨¬ ¢®ááâ ®¢«¥¨ï
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
|
||||
menu end
|
||||
|
||||
menu begin textinstalldark
|
||||
menu label ’¥ªá⮢ ï ãáâ ®¢ª ¢ ⥬®¬ ^®ä®à¬«¥¨¨
|
||||
menu title ’¥ªá⮢ ï ãáâ ®¢ª ¢ ⥬®¬ ®ä®à¬«¥¨¨
|
||||
include stdmenu.cfg
|
||||
label mainmenu
|
||||
menu label ^<5E> § ¤..
|
||||
menu exit
|
||||
|
||||
label darkinstall
|
||||
menu label ^“áâ ®¢ª
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append vga=788 theme=dark @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label darkexpert
|
||||
menu label ^<5E>ªá¯¥àâ ï ãáâ ®¢ª
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append priority=low vga=788 theme=dark @APPEND_INSTALL@
|
||||
|
||||
label darkauto
|
||||
menu label ^€¢â®¬ â¨ç¥áª ï ãáâ ®¢ª
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append auto=true priority=critical vga=788 theme=dark @APPEND_INSTALL@ --- quiet
|
||||
|
||||
label darkrescue
|
||||
menu label ^<5E>¥¦¨¬ ¢®ááâ ®¢«¥¨ï
|
||||
linux @KERNEL_DI@
|
||||
initrd @INITRD_DI@
|
||||
append rescue/enable=true vga=788 theme=dark @APPEND_INSTALL@ --- quiet
|
||||
menu end
|
||||
menu end
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/syslinux/modules/bios/libcom32.c32
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/syslinux/modules/bios/libgpl.c32
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/syslinux/modules/bios/libmenu.c32
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/syslinux/modules/bios/libutil.c32
|
|
@ -0,0 +1,12 @@
|
|||
label live-@FLAVOUR@
|
||||
menu label ^Live (@FLAVOUR@)
|
||||
menu default
|
||||
linux @LINUX@
|
||||
initrd @INITRD@
|
||||
append @APPEND_LIVE@ locales=ru_RU.UTF-8
|
||||
|
||||
label live-@FLAVOUR@-failsafe
|
||||
menu label Live (@FLAVOUR@ ¡¥§®¯ áë© à¥¦¨¬)
|
||||
linux @LINUX@
|
||||
initrd @INITRD@
|
||||
append @APPEND_LIVE_FAILSAFE@ locales=ru_RU.UTF-8
|
|
@ -0,0 +1,3 @@
|
|||
label memtest
|
||||
menu label ^„¨ £®á⨪ Ž‡“ (@MEMTEST_VERSION@)
|
||||
linux @MEMTEST@
|
|
@ -0,0 +1,18 @@
|
|||
menu hshift 0
|
||||
menu width 82
|
||||
|
||||
menu title Œ¥î § £à㧪¨
|
||||
include stdmenu.cfg
|
||||
include live.cfg
|
||||
@OPTIONAL_INSTALLER_INCLUDE@
|
||||
menu begin utilities
|
||||
menu label ^“⨫¨âë
|
||||
menu title “⨫¨âë
|
||||
include stdmenu.cfg
|
||||
label mainmenu
|
||||
menu label ^<5E> § ¤..
|
||||
menu exit
|
||||
include utilities.cfg
|
||||
menu end
|
||||
|
||||
menu clear
|
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1,16 @@
|
|||
font cyr_a8x16.psf
|
||||
menu background splash.png
|
||||
menu color title * #FFFFFFFF *
|
||||
menu color border * #00000000 #00000000 none
|
||||
menu color sel * #ffffffff #76a1d0ff *
|
||||
menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *
|
||||
menu color tabmsg * #ffffffff #00000000 *
|
||||
menu color help 37;40 #ffdddd00 #00000000 none
|
||||
menu vshift 12
|
||||
menu rows 10
|
||||
menu helpmsgrow 15
|
||||
# The command line must be at least one line from the bottom.
|
||||
menu cmdlinerow 16
|
||||
menu timeoutrow 16
|
||||
menu tabmsgrow 18
|
||||
menu tabmsg <20> ¦¬¨â¥ ENTER ¤«ï § £à㧪¨ ¨«¨ TAB ¤«ï ¨§¬¥¥¨ï ¯ãªâ ¬¥î
|
|
@ -0,0 +1,5 @@
|
|||
label hdt
|
||||
menu label ^“⨫¨â ®¯à¥¤¥«¥¨ï ®¡®à㤮¢ ¨ï
|
||||
com32 hdt.c32
|
||||
|
||||
@OPTIONAL_MEMTEST_INCLUDE@
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/syslinux/modules/bios/vesamenu.c32
|
|
@ -0,0 +1,152 @@
|
|||
#!/bin/bash
|
||||
# (GNU/General Public License version 3.0)
|
||||
# Пошаговый процесс постройки Live-Build
|
||||
# Система уже должна иметь live-build squashfs-tools syslinux-common syslinux-utils xorriso isolinux
|
||||
|
||||
# Рабочая директория
|
||||
WKDIR="$(pwd)"
|
||||
|
||||
# Удаляем кеш иконок и топаем в папку output
|
||||
[[ -f /usr/share/live/build/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot ]] && rm /usr/share/live/build/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot
|
||||
mkdir output 2>/dev/null
|
||||
cd output
|
||||
|
||||
# Первоначальная конфигурация
|
||||
lb config \
|
||||
--binary-images iso-hybrid \
|
||||
--mode debian \
|
||||
--architectures amd64 \
|
||||
--linux-flavours amd64 \
|
||||
--distribution bullseye \
|
||||
--archive-areas "main contrib" \
|
||||
--updates false \
|
||||
--security false \
|
||||
--cache true \
|
||||
--apt-recommends true \
|
||||
--mirror-binary https://updates.osgos.ru/ \
|
||||
--mirror-binary-security https://security.osgos.ru/ \
|
||||
--mirror-chroot https://updates.osgos.ru/packages/ \
|
||||
--mirror-chroot-security https://security.osgos.ru/ \
|
||||
--debian-installer live \
|
||||
--debian-installer-gui true \
|
||||
--bootappend-live "boot=live components quiet splash live-config.hostname=osgos live-config.user-fullname=Пользователь" \
|
||||
--win32-loader false \
|
||||
--iso-application osgos \
|
||||
--iso-preparer osgos-https://osgos.ru/ \
|
||||
--iso-publisher osgos-https://osgos.ru/ \
|
||||
--iso-volume osgos
|
||||
|
||||
# Устанавливаем оконный менеджер и пакеты
|
||||
echo "accountsservice alsa-utils cups cups-filters curl dbus-user-session dbus-x11 dconf-cli foomatic-db foomatic-db-engine fuse3 ghostscript gnome-keyring gvfs-backends gvfs-bin gvfs-fuse iw libnss-mdns libsmbclient light-locker lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings lsb-release mousepad netcat-openbsd network-manager-gnome network-manager-openconnect-gnome network-manager-openvpn-gnome pavucontrol perl plymouth plymouth-label policykit-1 printer-driver-gutenprint pulseaudio samba-common-bin sudo synaptic system-config-printer udisks2 upower xdg-utils xfce4 xfce4-goodies xfce4-power-manager xfce4-terminal xfce4-screenshooter xfce4-whiskermenu-plugin xfce4-xkb-plugin xorg xserver-xorg-input-all xserver-xorg-video-all xterm mugshot" > $WKDIR/output/config/package-lists/mydesktop.list.chroot
|
||||
|
||||
echo "aisleriot apt-transport-https arc-theme audacious audacious-plugins autoconf automake breeze-gtk-theme breeze-icon-theme btrfs-progs build-essential cdtool cdrdao cdrskin cifs-utils debconf debhelper dh-autoreconf dialog dirmngr dkms dos2unix dosbox dosfstools dvdauthor exfatprogs faad fakeroot ffmpeg flac frei0r-plugins galculator gdebi gir1.2-ibus-1.0 gnome-disk-utility gnome-nettool gnome-system-tools greybird-gtk-theme grsync gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-plugins-good gthumb guvcview hardinfo haveged htop hunspell-en-us hyphen-en-us ibus ibus-data ibus-gtk ibus-gtk3 iftop im-config inxi isolinux jfsutils lame less libegl1-mesa libibus-1.0-5 libgl1-mesa-glx libqt5opengl5 libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer libreoffice-gtk3 libreoffice-l10n-ru libreoffice-help-ru libxcb-xtest0 libxvidcore4 linux-headers-amd64 live-build lshw libu2f-udev fonts-liberation mencoder menu mjpegtools mpg321 mpv mtools mythes-en-us neofetch ntfs-3g numix-gtk-theme openconnect openvpn openvpn-systemd-resolved p7zip-full papirus-icon-theme pciutils python3-ibus-1.0 simple-scan smplayer smplayer-l10n smplayer-themes soundconverter sox squashfs-tools streamripper syslinux syslinux-common tango-icon-theme testdisk twolame unzip wget x265 x264 xfsprogs xorriso xscreensaver zip thunderbird thunderbird-l10n-ru ristretto krb5-user libpam-krb5 libpam-script samba smbclient winbind" > $WKDIR/output/config/package-lists/mypackages.list.chroot
|
||||
|
||||
echo "efibootmgr grub-common grub2-common grub-efi-amd64 grub-efi-amd64-bin grub-efi-amd64-signed grub-efi-ia32-bin grub-pc-bin libefiboot1 libefivar1 mokutil shim-helpers-amd64-signed shim-signed-common shim-unsigned" > $WKDIR/output/config/package-lists/grubuefi.list.binary
|
||||
|
||||
# Убери комментарий с 5 строк ниже чтобы включить Calamares Installer:
|
||||
# echo "calamares calamares-settings-debian" > $WKDIR/output/config/package-lists/calamares.list.chroot
|
||||
# mkdir -p $WKDIR/output/config/includes.chroot/etc/calamares/branding
|
||||
# cp $WKDIR/calamares/settings.conf $WKDIR/output/config/includes.chroot/etc/calamares/settings.conf
|
||||
# cp $WKDIR/calamares/usr/share/applications/install-debian.desktop $WKDIR/output/config/includes.chroot/usr/share/applications/install-debian.desktop
|
||||
# cp -r $WKDIR/calamares/branding/osgos $WKDIR/output/config/includes.chroot/etc/calamares/branding/osgos
|
||||
|
||||
# Предварительно создаем папки в chroot
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/usr/share/osgos
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/etc/skel/.config
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/usr/share/backgrounds
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/usr/share/icons/default
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/usr/local/bin
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/usr/share/applications
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/usr/share/doc/osgos
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/etc/skel/Desktop
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/etc/apt
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/usr/lib
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/etc/plymouth
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/usr/share/desktop-base/homeworld-theme
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/etc/default
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/etc/lightdm
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/etc/xdg/xfce4
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/usr/share/icons
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/usr/share/themes
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/usr/share/libpam-script
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/etc/pam.d
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/usr/share/locale/ru/LC_MESSAGES
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/sbin
|
||||
mkdir -p $WKDIR/output/config/includes.chroot/etc/systemd/system
|
||||
|
||||
# Копируем измененные файлы в chroot
|
||||
cp -r $WKDIR/bootloaders $WKDIR/output/config/
|
||||
cp -r $WKDIR/xfce4 $WKDIR/output/config/includes.chroot/etc/skel/.config/
|
||||
cp $WKDIR/configs/helpers.rc $WKDIR/output/config/includes.chroot/etc/xdg/xfce4/helpers.rc
|
||||
cp $WKDIR/configs/user-dirs.defaults $WKDIR/output/config/includes.chroot/etc/xdg/user-dirs.defaults
|
||||
cp $WKDIR/sources/apt.conf $WKDIR/output/config/includes.chroot/etc/apt/apt.conf
|
||||
cp $WKDIR/configs/os-release $WKDIR/output/config/includes.chroot/etc/os-release
|
||||
cp $WKDIR/configs/os-release $WKDIR/output/config/includes.chroot/usr/lib/os-release
|
||||
cp $WKDIR/configs/plymouthd.conf $WKDIR/output/config/includes.chroot/etc/plymouth/plymouthd.conf
|
||||
cp -r $WKDIR/themes/plymouth/* $WKDIR/output/config/includes.chroot/usr/share/desktop-base/homeworld-theme/
|
||||
cp -r $WKDIR/themes/colors/* $WKDIR/output/config/includes.chroot/usr/share/themes/
|
||||
cp $WKDIR/configs/keyboard $WKDIR/output/config/includes.chroot/etc/default/keyboard
|
||||
cp $WKDIR/configs/preseed.cfg $WKDIR/output/config/includes.installer/
|
||||
cp $WKDIR/configs/issue $WKDIR/output/config/includes.chroot/etc/issue
|
||||
cp $WKDIR/configs/issue.net $WKDIR/output/config/includes.chroot/etc/issue.net
|
||||
cp $WKDIR/configs/motd $WKDIR/output/config/includes.chroot/etc/motd
|
||||
cp $WKDIR/configs/sysctl.conf $WKDIR/output/config/includes.chroot/etc/sysctl.conf
|
||||
cp $WKDIR/configs/lightdm-gtk-greeter.conf $WKDIR/output/config/includes.chroot/etc/lightdm/lightdm-gtk-greeter.conf
|
||||
tar zxvf $WKDIR/themes/icons/Wings-Light-Icons.tgz -C $WKDIR/output/config/includes.chroot/usr/share/icons/
|
||||
cp $WKDIR/configs/pam_script_acct $WKDIR/output/config/includes.chroot/usr/share/libpam-script/
|
||||
cp -r $WKDIR/configs/pam.d/* $WKDIR/output/config/includes.chroot/etc/pam.d/
|
||||
cp $WKDIR/configs/krb5.conf $WKDIR/output/config/includes.chroot/etc/
|
||||
cp -r $WKDIR/locale/* $WKDIR/output/config/includes.chroot/usr/share/locale/ru/LC_MESSAGES/
|
||||
cp $WKDIR/backgrounds/* $WKDIR/output/config/includes.chroot/usr/share/backgrounds/
|
||||
|
||||
# Дополительные скрипты для пользователя и системы
|
||||
cp $WKDIR/scripts/* $WKDIR/output/config/includes.chroot/usr/local/bin/
|
||||
|
||||
# Иконки и дополнительные ярлыки
|
||||
cp $WKDIR/icons/* $WKDIR/output/config/includes.chroot/usr/share/icons/default/
|
||||
cp $WKDIR/launchers/* $WKDIR/output/config/includes.chroot/usr/share/applications/
|
||||
|
||||
# Хелпер для справки, регистрации, магазина
|
||||
cp $WKDIR/custom/helper/build/helper $WKDIR/output/config/includes.chroot/usr/local/bin/
|
||||
cp -r $WKDIR/doc/* $WKDIR/output/config/includes.chroot/usr/share/doc/osgos/
|
||||
|
||||
# Диспетчер приложений(магазин)
|
||||
cp $WKDIR/custom/shop-client/build/shop-client $WKDIR/output/config/includes.chroot/usr/local/bin/shop
|
||||
cp -r $WKDIR/custom/shop-client/build/web $WKDIR/output/config/includes.chroot/usr/share/doc/osgos/shop
|
||||
cp $WKDIR/configs/shop.service $WKDIR/output/config/includes.chroot/etc/systemd/system
|
||||
|
||||
# Сервис регистрации
|
||||
cp $WKDIR/custom/reg-client/build/reg-client $WKDIR/output/config/includes.chroot/sbin/starter
|
||||
cp -r $WKDIR/custom/reg-client/build/web $WKDIR/output/config/includes.chroot/usr/share/doc/osgos/reg
|
||||
cp $WKDIR/configs/reg.service $WKDIR/output/config/includes.chroot/etc/systemd/system
|
||||
|
||||
# Вносим изменения в систему установщика
|
||||
mkdir -p $WKDIR/output/config/includes.installer/usr/share/graphics/
|
||||
cp $WKDIR/installer/graphics/* $WKDIR/output/config/includes.installer/usr/share/graphics/
|
||||
mkdir -p $WKDIR/output/config/includes.installer/var/lib/dpkg/info/
|
||||
cp $WKDIR/installer/main-menu.templates $WKDIR/output/config/includes.installer/var/lib/dpkg/info/
|
||||
|
||||
# Дополнительные пакеты для установки
|
||||
if [ ! -f $WKDIR/misc64/chromium-*.deb ]; then
|
||||
wget https://github.com/deemru/Chromium-Gost/releases/download/111.0.5563.64/chromium-gost-111.0.5563.64-linux-amd64.deb -O $WKDIR/misc64/chromium-gost-111.0.5563.64-linux-amd64.deb
|
||||
fi
|
||||
|
||||
if [ ! -f $WKDIR/misc64/linux-image-*.deb ]; then
|
||||
echo "скомпилируй ядро и положи в misc64"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dpkg-name $WKDIR/misc64/*.deb
|
||||
cp $WKDIR/misc64/*.deb $WKDIR/output/config/packages.chroot/
|
||||
cp $WKDIR/misc64/*.deb $WKDIR/output/config/packages.binary/
|
||||
cp $WKDIR/misc64/*.udeb $WKDIR/output/config/packages.binary/
|
||||
|
||||
# Финальные правки
|
||||
cp $WKDIR/sources/sources.list $WKDIR/output/config/archives/debian-updates-security-backports.list.binary
|
||||
cp $WKDIR/sources/sources.list $WKDIR/output/config/archives/debian-updates-security-backports.list.chroot
|
||||
|
||||
cp $WKDIR/hooks/0999-remove-unwanted-packages.hook.chroot $WKDIR/output/config/hooks/normal/
|
||||
cp $WKDIR/hooks/0998-startup-fix.hook.chroot $WKDIR/output/config/hooks/live/
|
||||
|
||||
# Начинаем процесс постройки
|
||||
time lb build
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
componentName: osgos
|
||||
welcomeStyleCalamares: true
|
||||
|
||||
strings:
|
||||
productName: OSGOS
|
||||
shortProductName: SOGOS
|
||||
version: 116X1
|
||||
shortVersion: 116X1
|
||||
versionedName: OSGOS
|
||||
shortVersionedName: OSGOS
|
||||
bootloaderEntryName: Debian
|
||||
productUrl:
|
||||
supportUrl:
|
||||
releaseNotesUrl:
|
||||
|
||||
images:
|
||||
productLogo: "osgos-logo.png"
|
||||
productIcon: "osgos-logo.png"
|
||||
productWelcome: "welcome.png"
|
||||
|
||||
slideshow: "show.qml"
|
||||
|
||||
style:
|
||||
sidebarBackground: "#2c3133"
|
||||
sidebarText: "#FFFFFF"
|
||||
sidebarTextSelect: "#4d7079"
|
After Width: | Height: | Size: 33 KiB |
|
@ -0,0 +1,51 @@
|
|||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2018, Jonathan Carter <jcc@debian.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, or (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.0;
|
||||
import calamares.slideshow 1.0;
|
||||
|
||||
Presentation
|
||||
{
|
||||
id: presentation
|
||||
|
||||
Timer {
|
||||
interval: 20000
|
||||
repeat: true
|
||||
onTriggered: presentation.goToNextSlide()
|
||||
}
|
||||
|
||||
Slide {
|
||||
Image {
|
||||
id: background1
|
||||
source: "slide1.png"
|
||||
width: 467; height: 280
|
||||
fillMode: Image.PreserveAspectFit
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
Text {
|
||||
anchors.horizontalCenter: background1.horizontalCenter
|
||||
anchors.top: background1.bottom
|
||||
text: "Welcome to OSGOS<br/>"+
|
||||
"The installation should complete in a few minutes."
|
||||
wrapMode: Text.WordWrap
|
||||
width: 600
|
||||
horizontalAlignment: Text.Center
|
||||
}
|
||||
}
|
||||
|
||||
}
|
After Width: | Height: | Size: 186 KiB |
After Width: | Height: | Size: 175 KiB |
|
@ -0,0 +1,91 @@
|
|||
# Configuration file for Calamares
|
||||
# Syntax is YAML 1.2
|
||||
---
|
||||
|
||||
# "local" is LIBDIR/calamares/modules with settings in SHARE/calamares/modules
|
||||
modules-search: [ local, /usr/lib/calamares/modules ]
|
||||
|
||||
sequence:
|
||||
|
||||
# Phase 1 - prepare.
|
||||
# View modules are shown as UI pages, jobs from job modules
|
||||
# are executed immediately in the background.
|
||||
# Jobs should be executed sparingly (if at all) in this phase.
|
||||
- show:
|
||||
- welcome
|
||||
- locale
|
||||
- keyboard
|
||||
- partition
|
||||
- users
|
||||
- summary
|
||||
|
||||
# Phase 2 - install.
|
||||
# View modules are not shown. Only the view modules shown
|
||||
# in the previous phase are allowed, their names should be
|
||||
# added here as placeholders to specify the order in which
|
||||
# view module jobs should be enqueued. Job modules are
|
||||
# also allowed.
|
||||
- exec:
|
||||
- partition
|
||||
- mount
|
||||
- unpackfs
|
||||
- sources-media
|
||||
- machineid
|
||||
- fstab
|
||||
- locale
|
||||
- keyboard
|
||||
- localecfg
|
||||
- users
|
||||
- networkcfg
|
||||
- hwclock
|
||||
- services-systemd
|
||||
- bootloader-config
|
||||
- grubcfg
|
||||
- bootloader
|
||||
- packages
|
||||
- luksbootkeyfile
|
||||
- plymouthcfg
|
||||
- initramfscfg
|
||||
- initramfs
|
||||
- sources-media-unmount
|
||||
- sources-final
|
||||
- umount
|
||||
|
||||
# Phase 3 - postinstall.
|
||||
# View modules are shown as UI pages, jobs from job modules are
|
||||
# executed immediately in the background.
|
||||
# Jobs should be executed sparingly (if at all) in this phase.
|
||||
- show:
|
||||
- finished
|
||||
|
||||
# A branding component is a directory, either in
|
||||
# SHARE/calamares/branding or in /etc/calamares/branding
|
||||
# (the latter takes precedence). The directory must contain a
|
||||
# YAML file branding.desc which may reference additional resources
|
||||
# (such as images) as paths relative to the current directory.
|
||||
# Only the name of the branding component (directory) should be
|
||||
# specified here, Calamares then takes care of finding it and
|
||||
# loading the contents.
|
||||
branding: osgos
|
||||
|
||||
# If this is set to true, Calamares will show an "Are you sure?" prompt right
|
||||
# before each execution phase, i.e. at points of no return. If this is set to
|
||||
# false, no prompt is shown. Default is false.
|
||||
#
|
||||
# YAML: boolean.
|
||||
prompt-install: false
|
||||
|
||||
# If this is set to true, Calamares will execute all target environment
|
||||
# commands in the current environment, without chroot. This setting should
|
||||
# only be used when setting up Calamares as a post-install configuration tool,
|
||||
# as opposed to a full operating system installer.
|
||||
#
|
||||
# Some official Calamares modules are not expected to function with this
|
||||
# setting. (e.g. partitioning seems like a bad idea, since that is expected to
|
||||
# have been done already)
|
||||
#
|
||||
# Default is false (for a normal installer).
|
||||
#
|
||||
# YAML: boolean.
|
||||
dont-chroot: false
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=Install OSGOS
|
||||
GenericName=Calamares Installer
|
||||
Exec=install-debian
|
||||
Comment=Calamares — Installer for OSGOS
|
||||
Keywords=calamares;system;install;debian;installer
|
||||
Icon=/usr/share/icons/default/logo.png
|
||||
Terminal=false
|
||||
Categories=Qt;System;
|
||||
StartupWMClass=calamares
|
||||
StartupNotify=True
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd output && lb clean 2>/dev/null && rm -rf config
|
||||
|
||||
echo "Cleaned"
|
|
@ -0,0 +1,10 @@
|
|||
#
|
||||
# Default helpers.rc for Xfce's Preferred Applications
|
||||
#
|
||||
# Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org>
|
||||
#
|
||||
|
||||
WebBrowser=debian-sensible-browser
|
||||
MailReader=thunderbird
|
||||
TerminalEmulator=xfce4-terminal
|
||||
FileManager=thunar
|
|
@ -0,0 +1 @@
|
|||
ОСГОС \n \l
|
|
@ -0,0 +1 @@
|
|||
ОСГОС
|
|
@ -0,0 +1,10 @@
|
|||
# CONSOLE KEYBOARD CONFIGURATION FILE
|
||||
|
||||
# Consult the keyboard(5) manual page.
|
||||
|
||||
XKBMODEL="pc105"
|
||||
XKBLAYOUT="ru,us"
|
||||
XKBVARIANT=","
|
||||
XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll"
|
||||
|
||||
BACKSPACE="guess"
|
|
@ -0,0 +1,34 @@
|
|||
[libdefaults]
|
||||
default_realm = TEST.LOCAL
|
||||
|
||||
# The following krb5.conf variables are only for MIT Kerberos.
|
||||
kdc_timesync = 1
|
||||
ccache_type = 4
|
||||
forwardable = true
|
||||
proxiable = true
|
||||
|
||||
# The following encryption type specification will be used by MIT Kerberos
|
||||
# if uncommented. In general, the defaults in the MIT Kerberos code are
|
||||
# correct and overriding these specifications only serves to disable new
|
||||
# encryption types as they are added, creating interoperability problems.
|
||||
#
|
||||
# The only time when you might need to uncomment these lines and change
|
||||
# the enctypes is if you have local software that will break on ticket
|
||||
# caches containing ticket encryption types it doesn't know about (such as
|
||||
# old versions of Sun Java).
|
||||
|
||||
# default_tgs_enctypes = des3-hmac-sha1
|
||||
# default_tkt_enctypes = des3-hmac-sha1
|
||||
# permitted_enctypes = des3-hmac-sha1
|
||||
|
||||
# The following libdefaults parameters are only for Heimdal Kerberos.
|
||||
fcc-mit-ticketflags = true
|
||||
|
||||
[realms]
|
||||
TEST.LOCAL = {
|
||||
kdc = test.local
|
||||
admin_server = test.local
|
||||
}
|
||||
|
||||
[domain_realm]
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[greeter]
|
||||
background = /usr/share/backgrounds/default.png
|
||||
user-background = /usr/share/icons/default/logo.png
|
||||
default-user-image = /usr/share/icons/default/logo.png
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
Добро пожаловать в ОСГОС!
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
PRETTY_NAME="ОСГОС"
|
||||
NAME="ОСГОС"
|
||||
VERSION_ID="1"
|
||||
VERSION="1"
|
||||
VERSION_CODENAME=bullseye
|
||||
ID=osgos
|
||||
HOME_URL="https://osgos.ru/"
|
||||
SUPPORT_URL="https://osgos.ru/support"
|
||||
BUG_REPORT_URL="https://bugs.osgos.ru/"
|
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# /etc/pam.d/common-account - authorization settings common to all services
|
||||
#
|
||||
# This file is included from other service-specific PAM config files,
|
||||
# and should contain a list of the authorization modules that define
|
||||
# the central access policy for use on the system. The default is to
|
||||
# only deny service to users whose accounts are expired in /etc/shadow.
|
||||
#
|
||||
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
|
||||
# To take advantage of this, it is recommended that you configure any
|
||||
# local modules either before or after the default block, and use
|
||||
# pam-auth-update to manage selection of other modules. See
|
||||
# pam-auth-update(8) for details.
|
||||
#
|
||||
|
||||
# here are the per-package modules (the "Primary" block)
|
||||
account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so
|
||||
# here's the fallback if no module succeeds
|
||||
account requisite pam_deny.so
|
||||
# prime the stack with a positive return value if there isn't one already;
|
||||
# this avoids us returning an error just because nothing sets a success code
|
||||
# since the modules above will each just jump around
|
||||
account required pam_permit.so
|
||||
# and here are more per-package modules (the "Additional" block)
|
||||
# end of pam-auth-update config
|
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# /etc/pam.d/common-auth - authentication settings common to all services
|
||||
#
|
||||
# This file is included from other service-specific PAM config files,
|
||||
# and should contain a list of the authentication modules that define
|
||||
# the central authentication scheme for use on the system
|
||||
# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
|
||||
# traditional Unix authentication mechanisms.
|
||||
#
|
||||
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
|
||||
# To take advantage of this, it is recommended that you configure any
|
||||
# local modules either before or after the default block, and use
|
||||
# pam-auth-update to manage selection of other modules. See
|
||||
# pam-auth-update(8) for details.
|
||||
|
||||
# here are the per-package modules (the "Primary" block)
|
||||
auth [success=1 default=ignore] pam_unix.so nullok
|
||||
# here's the fallback if no module succeeds
|
||||
auth requisite pam_deny.so
|
||||
# prime the stack with a positive return value if there isn't one already;
|
||||
# this avoids us returning an error just because nothing sets a success code
|
||||
# since the modules above will each just jump around
|
||||
auth required pam_permit.so
|
||||
# and here are more per-package modules (the "Additional" block)
|
||||
# end of pam-auth-update config
|
|
@ -0,0 +1,34 @@
|
|||
#
|
||||
# /etc/pam.d/common-password - password-related modules common to all services
|
||||
#
|
||||
# This file is included from other service-specific PAM config files,
|
||||
# and should contain a list of modules that define the services to be
|
||||
# used to change user passwords. The default is pam_unix.
|
||||
|
||||
# Explanation of pam_unix options:
|
||||
# The "yescrypt" option enables
|
||||
#hashed passwords using the yescrypt algorithm, introduced in Debian
|
||||
#11. Without this option, the default is Unix crypt. Prior releases
|
||||
#used the option "sha512"; if a shadow password hash will be shared
|
||||
#between Debian 11 and older releases replace "yescrypt" with "sha512"
|
||||
#for compatibility . The "obscure" option replaces the old
|
||||
#`OBSCURE_CHECKS_ENAB' option in login.defs. See the pam_unix manpage
|
||||
#for other options.
|
||||
|
||||
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
|
||||
# To take advantage of this, it is recommended that you configure any
|
||||
# local modules either before or after the default block, and use
|
||||
# pam-auth-update to manage selection of other modules. See
|
||||
# pam-auth-update(8) for details.
|
||||
|
||||
# here are the per-package modules (the "Primary" block)
|
||||
password [success=1 default=ignore] pam_unix.so obscure yescrypt
|
||||
# here's the fallback if no module succeeds
|
||||
password requisite pam_deny.so
|
||||
# prime the stack with a positive return value if there isn't one already;
|
||||
# this avoids us returning an error just because nothing sets a success code
|
||||
# since the modules above will each just jump around
|
||||
password required pam_permit.so
|
||||
# and here are more per-package modules (the "Additional" block)
|
||||
password optional pam_gnome_keyring.so
|
||||
# end of pam-auth-update config
|
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# /etc/pam.d/common-session - session-related modules common to all services
|
||||
#
|
||||
# This file is included from other service-specific PAM config files,
|
||||
# and should contain a list of modules that define tasks to be performed
|
||||
# at the start and end of interactive sessions.
|
||||
#
|
||||
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
|
||||
# To take advantage of this, it is recommended that you configure any
|
||||
# local modules either before or after the default block, and use
|
||||
# pam-auth-update to manage selection of other modules. See
|
||||
# pam-auth-update(8) for details.
|
||||
|
||||
# here are the per-package modules (the "Primary" block)
|
||||
session [default=1] pam_permit.so
|
||||
# here's the fallback if no module succeeds
|
||||
session requisite pam_deny.so
|
||||
# prime the stack with a positive return value if there isn't one already;
|
||||
# this avoids us returning an error just because nothing sets a success code
|
||||
# since the modules above will each just jump around
|
||||
session required pam_permit.so
|
||||
# and here are more per-package modules (the "Additional" block)
|
||||
session required pam_unix.so
|
||||
session optional pam_systemd.so
|
||||
# end of pam-auth-update config
|
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# /etc/pam.d/common-session-noninteractive - session-related modules
|
||||
# common to all non-interactive services
|
||||
#
|
||||
# This file is included from other service-specific PAM config files,
|
||||
# and should contain a list of modules that define tasks to be performed
|
||||
# at the start and end of all non-interactive sessions.
|
||||
#
|
||||
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
|
||||
# To take advantage of this, it is recommended that you configure any
|
||||
# local modules either before or after the default block, and use
|
||||
# pam-auth-update to manage selection of other modules. See
|
||||
# pam-auth-update(8) for details.
|
||||
|
||||
# here are the per-package modules (the "Primary" block)
|
||||
session [default=1] pam_permit.so
|
||||
# here's the fallback if no module succeeds
|
||||
session requisite pam_deny.so
|
||||
# prime the stack with a positive return value if there isn't one already;
|
||||
# this avoids us returning an error just because nothing sets a success code
|
||||
# since the modules above will each just jump around
|
||||
session required pam_permit.so
|
||||
# and here are more per-package modules (the "Additional" block)
|
||||
session required pam_unix.so
|
||||
# end of pam-auth-update config
|
|
@ -0,0 +1,39 @@
|
|||
#%PAM-1.0
|
||||
|
||||
# Block login if they are globally disabled
|
||||
auth requisite pam_nologin.so
|
||||
|
||||
# Disable root login to GUI
|
||||
auth required pam_succeed_if.so user != root quiet
|
||||
|
||||
# Load environment from /etc/environment and ~/.pam_environment
|
||||
session required pam_env.so readenv=1
|
||||
session required pam_env.so readenv=1 envfile=/etc/default/locale
|
||||
|
||||
@include common-auth
|
||||
|
||||
-auth optional pam_gnome_keyring.so
|
||||
|
||||
@include common-account
|
||||
|
||||
# SELinux needs to be the first session rule. This ensures that any
|
||||
# lingering context has been cleared. Without out this it is possible
|
||||
# that a module could execute code in the wrong domain.
|
||||
# When the module is present, "required" would be sufficient (When SELinux
|
||||
# is disabled, this returns success.)
|
||||
session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close
|
||||
|
||||
session required pam_limits.so
|
||||
session required pam_loginuid.so
|
||||
@include common-session
|
||||
|
||||
# SELinux needs to intervene at login time to ensure that the process
|
||||
# starts in the proper default security context. Only sessions which are
|
||||
# intended to run in the user's context should be run after this.
|
||||
session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open
|
||||
# When the module is present, "required" would be sufficient (When SELinux
|
||||
# is disabled, this returns success.)
|
||||
|
||||
-session optional pam_gnome_keyring.so auto_start
|
||||
|
||||
@include common-password
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$PAM_USER" == "" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
id "$PAM_USER" &>/dev/null || /usr/sbin/useradd -m -s /bin/bash "$PAM_USER"
|
|
@ -0,0 +1,2 @@
|
|||
[Daemon]
|
||||
Theme=tribar
|
|
@ -0,0 +1,478 @@
|
|||
#_preseed_V1
|
||||
#### Contents of the preconfiguration file (for bullseye)
|
||||
### Localization
|
||||
# Preseeding only locale sets language, country and locale.
|
||||
d-i debian-installer/locale string ru_RU.UTF-8
|
||||
|
||||
# The values can also be preseeded individually for greater flexibility.
|
||||
#d-i debian-installer/language string en
|
||||
#d-i debian-installer/country string NL
|
||||
#d-i debian-installer/locale string en_GB.UTF-8
|
||||
# Optionally specify additional locales to be generated.
|
||||
#d-i localechooser/supported-locales multiselect en_US.UTF-8, nl_NL.UTF-8
|
||||
|
||||
# Keyboard selection.
|
||||
d-i console-keymaps-at/keymap select ru
|
||||
d-i keyboard-configuration/xkb-keymap select ru
|
||||
d-i keyboard-configuration/layoutcodey select ru
|
||||
d-i keyboard-configuration/toggle select Alt+Shift
|
||||
# d-i keyboard-configuration/toggle select No toggling
|
||||
|
||||
### Network configuration
|
||||
# Disable network configuration entirely. This is useful for cdrom
|
||||
# installations on non-networked devices where the network questions,
|
||||
# warning and long timeouts are a nuisance.
|
||||
d-i netcfg/enable boolean false
|
||||
|
||||
# netcfg will choose an interface that has link if possible. This makes it
|
||||
# skip displaying a list if there is more than one interface.
|
||||
#d-i netcfg/choose_interface select auto
|
||||
|
||||
# To pick a particular interface instead:
|
||||
#d-i netcfg/choose_interface select eth1
|
||||
|
||||
# To set a different link detection timeout (default is 3 seconds).
|
||||
# Values are interpreted as seconds.
|
||||
#d-i netcfg/link_wait_timeout string 10
|
||||
|
||||
# If you have a slow dhcp server and the installer times out waiting for
|
||||
# it, this might be useful.
|
||||
#d-i netcfg/dhcp_timeout string 60
|
||||
#d-i netcfg/dhcpv6_timeout string 60
|
||||
|
||||
# Automatic network configuration is the default.
|
||||
# If you prefer to configure the network manually, uncomment this line and
|
||||
# the static network configuration below.
|
||||
#d-i netcfg/disable_autoconfig boolean true
|
||||
|
||||
# If you want the preconfiguration file to work on systems both with and
|
||||
# without a dhcp server, uncomment these lines and the static network
|
||||
# configuration below.
|
||||
#d-i netcfg/dhcp_failed note
|
||||
#d-i netcfg/dhcp_options select Configure network manually
|
||||
|
||||
# Static network configuration.
|
||||
#
|
||||
# IPv4 example
|
||||
#d-i netcfg/get_ipaddress string 192.168.1.42
|
||||
#d-i netcfg/get_netmask string 255.255.255.0
|
||||
#d-i netcfg/get_gateway string 192.168.1.1
|
||||
#d-i netcfg/get_nameservers string 192.168.1.1
|
||||
#d-i netcfg/confirm_static boolean true
|
||||
#
|
||||
# IPv6 example
|
||||
#d-i netcfg/get_ipaddress string fc00::2
|
||||
#d-i netcfg/get_netmask string ffff:ffff:ffff:ffff::
|
||||
#d-i netcfg/get_gateway string fc00::1
|
||||
#d-i netcfg/get_nameservers string fc00::1
|
||||
#d-i netcfg/confirm_static boolean true
|
||||
|
||||
# Any hostname and domain names assigned from dhcp take precedence over
|
||||
# values set here. However, setting the values still prevents the questions
|
||||
# from being shown, even if values come from dhcp.
|
||||
d-i netcfg/get_hostname string osgos
|
||||
d-i netcfg/get_domain string unassigned-domain
|
||||
|
||||
# If you want to force a hostname, regardless of what either the DHCP
|
||||
# server returns or what the reverse DNS entry for the IP is, uncomment
|
||||
# and adjust the following line.
|
||||
#d-i netcfg/hostname string osgos
|
||||
|
||||
# Disable that annoying WEP key dialog.
|
||||
#d-i netcfg/wireless_wep string
|
||||
# The wacky dhcp hostname that some ISPs use as a password of sorts.
|
||||
#d-i netcfg/dhcp_hostname string radish
|
||||
|
||||
# If non-free firmware is needed for the network or other hardware, you can
|
||||
# configure the installer to always try to load it, without prompting. Or
|
||||
# change to false to disable asking.
|
||||
#d-i hw-detect/load_firmware boolean true
|
||||
|
||||
### Network console
|
||||
# Use the following settings if you wish to make use of the network-console
|
||||
# component for remote installation over SSH. This only makes sense if you
|
||||
# intend to perform the remainder of the installation manually.
|
||||
#d-i anna/choose_modules string network-console
|
||||
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
|
||||
#d-i network-console/password password r00tme
|
||||
#d-i network-console/password-again password r00tme
|
||||
|
||||
### Mirror settings
|
||||
# Mirror protocol:
|
||||
# If you select ftp, the mirror/country string does not need to be set.
|
||||
# Default value for the mirror protocol: http.
|
||||
#d-i mirror/protocol string ftp
|
||||
#d-i mirror/country string manual
|
||||
#d-i mirror/http/hostname string http.us.debian.org
|
||||
#d-i mirror/http/directory string /debian
|
||||
#d-i mirror/http/proxy string
|
||||
|
||||
# Suite to install.
|
||||
#d-i mirror/suite string testing
|
||||
# Suite to use for loading installer components (optional).
|
||||
#d-i mirror/udeb/suite string testing
|
||||
|
||||
### Account setup
|
||||
# Skip creation of a root account (normal user account will be able to
|
||||
# use sudo).
|
||||
#d-i passwd/root-login boolean false
|
||||
# Alternatively, to skip creation of a normal user account.
|
||||
#d-i passwd/make-user boolean false
|
||||
|
||||
# Root password, either in clear text
|
||||
#d-i passwd/root-password password r00tme
|
||||
#d-i passwd/root-password-again password r00tme
|
||||
# or encrypted using a crypt(3) hash.
|
||||
#d-i passwd/root-password-crypted password [crypt(3) hash]
|
||||
|
||||
# To create a normal user account.
|
||||
#d-i passwd/user-fullname string Debian User
|
||||
#d-i passwd/username string debian
|
||||
# Normal user's password, either in clear text
|
||||
#d-i passwd/user-password password insecure
|
||||
#d-i passwd/user-password-again password insecure
|
||||
# or encrypted using a crypt(3) hash.
|
||||
#d-i passwd/user-password-crypted password [crypt(3) hash]
|
||||
# Create the first user with the specified UID instead of the default.
|
||||
#d-i passwd/user-uid string 1010
|
||||
|
||||
# The user account will be added to some standard initial groups. To
|
||||
# override that, use this.
|
||||
#d-i passwd/user-default-groups string audio cdrom video
|
||||
|
||||
### Clock and time zone setup
|
||||
# Controls whether or not the hardware clock is set to UTC.
|
||||
#d-i clock-setup/utc boolean true
|
||||
|
||||
# You may set this to any valid setting for $TZ; see the contents of
|
||||
# /usr/share/zoneinfo/ for valid values.
|
||||
#d-i time/zone string US/Eastern
|
||||
|
||||
# Controls whether to use NTP to set the clock during the install
|
||||
d-i clock-setup/ntp boolean true
|
||||
# NTP server to use. The default is almost always fine here.
|
||||
d-i clock-setup/ntp-server string ntp.ix.ru
|
||||
|
||||
### Partitioning
|
||||
## Partitioning example
|
||||
# If the system has free space you can choose to only partition that space.
|
||||
# This is only honoured if partman-auto/method (below) is not set.
|
||||
#d-i partman-auto/init_automatically_partition select biggest_free
|
||||
|
||||
# Alternatively, you may specify a disk to partition. If the system has only
|
||||
# one disk the installer will default to using that, but otherwise the device
|
||||
# name must be given in traditional, non-devfs format (so e.g. /dev/sda
|
||||
# and not e.g. /dev/discs/disc0/disc).
|
||||
# For example, to use the first SCSI/SATA hard disk:
|
||||
#d-i partman-auto/disk string /dev/sda
|
||||
# In addition, you'll need to specify the method to use.
|
||||
# The presently available methods are:
|
||||
# - regular: use the usual partition types for your architecture
|
||||
# - lvm: use LVM to partition the disk
|
||||
# - crypto: use LVM within an encrypted partition
|
||||
#d-i partman-auto/method string lvm
|
||||
|
||||
# You can define the amount of space that will be used for the LVM volume
|
||||
# group. It can either be a size with its unit (eg. 20 GB), a percentage of
|
||||
# free space or the 'max' keyword.
|
||||
#d-i partman-auto-lvm/guided_size string max
|
||||
|
||||
# If one of the disks that are going to be automatically partitioned
|
||||
# contains an old LVM configuration, the user will normally receive a
|
||||
# warning. This can be preseeded away...
|
||||
#d-i partman-lvm/device_remove_lvm boolean true
|
||||
# The same applies to pre-existing software RAID array:
|
||||
#d-i partman-md/device_remove_md boolean true
|
||||
# And the same goes for the confirmation to write the lvm partitions.
|
||||
#d-i partman-lvm/confirm boolean true
|
||||
#d-i partman-lvm/confirm_nooverwrite boolean true
|
||||
|
||||
# You can choose one of the three predefined partitioning recipes:
|
||||
# - atomic: all files in one partition
|
||||
# - home: separate /home partition
|
||||
# - multi: separate /home, /var, and /tmp partitions
|
||||
#d-i partman-auto/choose_recipe select atomic
|
||||
|
||||
# Or provide a recipe of your own...
|
||||
# If you have a way to get a recipe file into the d-i environment, you can
|
||||
# just point at it.
|
||||
#d-i partman-auto/expert_recipe_file string /hd-media/recipe
|
||||
|
||||
# If not, you can put an entire recipe into the preconfiguration file in one
|
||||
# (logical) line. This example creates a small /boot partition, suitable
|
||||
# swap, and uses the rest of the space for the root partition:
|
||||
#d-i partman-auto/expert_recipe string \
|
||||
# boot-root :: \
|
||||
# 40 50 100 ext3 \
|
||||
# $primary{ } $bootable{ } \
|
||||
# method{ format } format{ } \
|
||||
# use_filesystem{ } filesystem{ ext3 } \
|
||||
# mountpoint{ /boot } \
|
||||
# . \
|
||||
# 500 10000 1000000000 ext3 \
|
||||
# method{ format } format{ } \
|
||||
# use_filesystem{ } filesystem{ ext3 } \
|
||||
# mountpoint{ / } \
|
||||
# . \
|
||||
# 64 512 300% linux-swap \
|
||||
# method{ swap } format{ } \
|
||||
# .
|
||||
|
||||
# The full recipe format is documented in the file partman-auto-recipe.txt
|
||||
# included in the 'debian-installer' package or available from D-I source
|
||||
# repository. This also documents how to specify settings such as file
|
||||
# system labels, volume group names and which physical devices to include
|
||||
# in a volume group.
|
||||
|
||||
## Partitioning for EFI
|
||||
# If your system needs an EFI partition you could add something like
|
||||
# this to the recipe above, as the first element in the recipe:
|
||||
# 538 538 1075 free \
|
||||
# $iflabel{ gpt } \
|
||||
# $reusemethod{ } \
|
||||
# method{ efi } \
|
||||
# format{ } \
|
||||
# . \
|
||||
#
|
||||
# The fragment above is for the amd64 architecture; the details may be
|
||||
# different on other architectures. The 'partman-auto' package in the
|
||||
# D-I source repository may have an example you can follow.
|
||||
|
||||
# This makes partman automatically partition without confirmation, provided
|
||||
# that you told it what to do using one of the methods above.
|
||||
#d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
#d-i partman/choose_partition select finish
|
||||
#d-i partman/confirm boolean true
|
||||
#d-i partman/confirm_nooverwrite boolean true
|
||||
|
||||
# Force UEFI booting ('BIOS compatibility' will be lost). Default: false.
|
||||
#d-i partman-efi/non_efi_system boolean true
|
||||
# Ensure the partition table is GPT - this is required for EFI
|
||||
#d-i partman-partitioning/choose_label select gpt
|
||||
#d-i partman-partitioning/default_label string gpt
|
||||
|
||||
# When disk encryption is enabled, skip wiping the partitions beforehand.
|
||||
#d-i partman-auto-crypto/erase_disks boolean false
|
||||
|
||||
## Partitioning using RAID
|
||||
# The method should be set to "raid".
|
||||
#d-i partman-auto/method string raid
|
||||
# Specify the disks to be partitioned. They will all get the same layout,
|
||||
# so this will only work if the disks are the same size.
|
||||
#d-i partman-auto/disk string /dev/sda /dev/sdb
|
||||
|
||||
# Next you need to specify the physical partitions that will be used.
|
||||
#d-i partman-auto/expert_recipe string \
|
||||
# multiraid :: \
|
||||
# 1000 5000 4000 raid \
|
||||
# $primary{ } method{ raid } \
|
||||
# . \
|
||||
# 64 512 300% raid \
|
||||
# method{ raid } \
|
||||
# . \
|
||||
# 500 10000 1000000000 raid \
|
||||
# method{ raid } \
|
||||
# .
|
||||
|
||||
# Last you need to specify how the previously defined partitions will be
|
||||
# used in the RAID setup. Remember to use the correct partition numbers
|
||||
# for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported;
|
||||
# devices are separated using "#".
|
||||
# Parameters are:
|
||||
# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \
|
||||
# <devices> <sparedevices>
|
||||
|
||||
#d-i partman-auto-raid/recipe string \
|
||||
# 1 2 0 ext3 / \
|
||||
# /dev/sda1#/dev/sdb1 \
|
||||
# . \
|
||||
# 1 2 0 swap - \
|
||||
# /dev/sda5#/dev/sdb5 \
|
||||
# . \
|
||||
# 0 2 0 ext3 /home \
|
||||
# /dev/sda6#/dev/sdb6 \
|
||||
# .
|
||||
|
||||
# For additional information see the file partman-auto-raid-recipe.txt
|
||||
# included in the 'debian-installer' package or available from D-I source
|
||||
# repository.
|
||||
|
||||
# This makes partman automatically partition without confirmation.
|
||||
#d-i partman-md/confirm boolean true
|
||||
#d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
#d-i partman/choose_partition select finish
|
||||
#d-i partman/confirm boolean true
|
||||
#d-i partman/confirm_nooverwrite boolean true
|
||||
|
||||
## Controlling how partitions are mounted
|
||||
# The default is to mount by UUID, but you can also choose "traditional" to
|
||||
# use traditional device names, or "label" to try filesystem labels before
|
||||
# falling back to UUIDs.
|
||||
#d-i partman/mount_style select uuid
|
||||
|
||||
### Base system installation
|
||||
# Configure APT to not install recommended packages by default. Use of this
|
||||
# option can result in an incomplete system and should only be used by very
|
||||
# experienced users.
|
||||
#d-i base-installer/install-recommends boolean false
|
||||
|
||||
# The kernel image (meta) package to be installed; "none" can be used if no
|
||||
# kernel is to be installed.
|
||||
#d-i base-installer/kernel/image string linux-image-686
|
||||
|
||||
### Apt setup
|
||||
# Choose, if you want to scan additional installation media
|
||||
# (default: false).
|
||||
#d-i apt-setup/cdrom/set-first boolean false
|
||||
# You can choose to install non-free and contrib software.
|
||||
d-i apt-setup/non-free boolean false
|
||||
#d-i apt-setup/contrib boolean true
|
||||
# Uncomment the following line, if you don't want to have the sources.list
|
||||
# entry for a DVD/BD installation image active in the installed system
|
||||
# (entries for netinst or CD images will be disabled anyway, regardless of
|
||||
# this setting).
|
||||
#d-i apt-setup/disable-cdrom-entries boolean true
|
||||
# Uncomment this if you don't want to use a network mirror.
|
||||
d-i apt-setup/use_mirror boolean false
|
||||
# Select which update services to use; define the mirrors to be used.
|
||||
# Values shown below are the normal defaults.
|
||||
#d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string security.osgos.ru
|
||||
|
||||
# Additional repositories, local[0-9] available
|
||||
#d-i apt-setup/local0/repository string \
|
||||
# http://local.server/debian stable main
|
||||
#d-i apt-setup/local0/comment string local server
|
||||
# Enable deb-src lines
|
||||
#d-i apt-setup/local0/source boolean true
|
||||
# URL to the public key of the local repository; you must provide a key or
|
||||
# apt will complain about the unauthenticated repository and so the
|
||||
# sources.list line will be left commented out.
|
||||
#d-i apt-setup/local0/key string http://local.server/key
|
||||
# If the provided key file ends in ".asc" the key file needs to be an
|
||||
# ASCII-armoured PGP key, if it ends in ".gpg" it needs to use the
|
||||
# "GPG key public keyring" format, the "keybox database" format is
|
||||
# currently not supported.
|
||||
|
||||
# By default the installer requires that repositories be authenticated
|
||||
# using a known gpg key. This setting can be used to disable that
|
||||
# authentication. Warning: Insecure, not recommended.
|
||||
#d-i debian-installer/allow_unauthenticated boolean true
|
||||
|
||||
# Uncomment this to add multiarch configuration for i386
|
||||
#d-i apt-setup/multiarch string i386
|
||||
|
||||
|
||||
### Package selection
|
||||
#tasksel tasksel/first multiselect standard, web-server, kde-desktop
|
||||
|
||||
# Or choose to not get the tasksel dialog displayed at all (and don't install
|
||||
# any packages):
|
||||
#d-i pkgsel/run_tasksel boolean false
|
||||
|
||||
# Individual additional packages to install
|
||||
#d-i pkgsel/include string openssh-server build-essential
|
||||
# Whether to upgrade packages after debootstrap.
|
||||
# Allowed values: none, safe-upgrade, full-upgrade
|
||||
#d-i pkgsel/upgrade select none
|
||||
|
||||
# You can choose, if your system will report back on what software you have
|
||||
# installed, and what software you use. The default is not to report back,
|
||||
# but sending reports helps the project determine what software is most
|
||||
# popular and should be included on the first CD/DVD.
|
||||
#popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
### Boot loader installation
|
||||
# Grub is the boot loader (for x86).
|
||||
|
||||
# This is fairly safe to set, it makes grub install automatically to the UEFI
|
||||
# partition/boot record if no other operating system is detected on the machine.
|
||||
#d-i grub-installer/only_debian boolean true
|
||||
|
||||
# This one makes grub-installer install to the UEFI partition/boot record, if
|
||||
# it also finds some other OS, which is less safe as it might not be able to
|
||||
# boot that other OS.
|
||||
#d-i grub-installer/with_other_os boolean true
|
||||
|
||||
# Due notably to potential USB sticks, the location of the primary drive can
|
||||
# not be determined safely in general, so this needs to be specified:
|
||||
#d-i grub-installer/bootdev string /dev/sda
|
||||
# To install to the primary device (assuming it is not a USB stick):
|
||||
#d-i grub-installer/bootdev string default
|
||||
|
||||
# Alternatively, if you want to install to a location other than the UEFI
|
||||
# parition/boot record, uncomment and edit these lines:
|
||||
#d-i grub-installer/only_debian boolean false
|
||||
#d-i grub-installer/with_other_os boolean false
|
||||
#d-i grub-installer/bootdev string (hd0,1)
|
||||
# To install grub to multiple disks:
|
||||
#d-i grub-installer/bootdev string (hd0,1) (hd1,1) (hd2,1)
|
||||
|
||||
# Optional password for grub, either in clear text
|
||||
#d-i grub-installer/password password r00tme
|
||||
#d-i grub-installer/password-again password r00tme
|
||||
# or encrypted using an MD5 hash, see grub-md5-crypt(8).
|
||||
#d-i grub-installer/password-crypted password [MD5 hash]
|
||||
|
||||
# Use the following option to add additional boot parameters for the
|
||||
# installed system (if supported by the bootloader installer).
|
||||
# Note: options passed to the installer will be added automatically.
|
||||
#d-i debian-installer/add-kernel-opts string nousb
|
||||
|
||||
### Finishing up the installation
|
||||
# During installations from serial console, the regular virtual consoles
|
||||
# (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next
|
||||
# line to prevent this.
|
||||
#d-i finish-install/keep-consoles boolean true
|
||||
|
||||
# Avoid that last message about the install being complete.
|
||||
d-i finish-install/reboot_in_progress note
|
||||
|
||||
# This will prevent the installer from ejecting the CD during the reboot,
|
||||
# which is useful in some situations.
|
||||
#d-i cdrom-detect/eject boolean false
|
||||
|
||||
# This is how to make the installer shutdown when finished, but not
|
||||
# reboot into the installed system.
|
||||
#d-i debian-installer/exit/halt boolean true
|
||||
# This will power off the machine instead of just halting it.
|
||||
#d-i debian-installer/exit/poweroff boolean true
|
||||
|
||||
### Preseeding other packages
|
||||
# Depending on what software you choose to install, or if things go wrong
|
||||
# during the installation process, it's possible that other questions may
|
||||
# be asked. You can preseed those too, of course. To get a list of every
|
||||
# possible question that could be asked during an install, do an
|
||||
# installation, and then run these commands:
|
||||
# debconf-get-selections --installer > file
|
||||
# debconf-get-selections >> file
|
||||
|
||||
|
||||
#### Advanced options
|
||||
### Running custom commands during the installation
|
||||
# d-i preseeding is inherently not secure. Nothing in the installer checks
|
||||
# for attempts at buffer overflows or other exploits of the values of a
|
||||
# preconfiguration file like this one. Only use preconfiguration files from
|
||||
# trusted locations! To drive that home, and because it's generally useful,
|
||||
# here's a way to run any shell command you'd like inside the installer,
|
||||
# automatically.
|
||||
|
||||
# This first command is run as early as possible, just after
|
||||
# preseeding is read.
|
||||
#d-i preseed/early_command string anna-install some-udeb
|
||||
# This command is run immediately before the partitioner starts. It may be
|
||||
# useful to apply dynamic partitioner preseeding that depends on the state
|
||||
# of the disks (which may not be visible when preseed/early_command runs).
|
||||
#d-i partman/early_command \
|
||||
# string debconf-set partman-auto/disk "$(list-devices disk | head -n1)"
|
||||
# This command is run just before the install finishes, but when there is
|
||||
# still a usable /target directory. You can chroot to /target and use it
|
||||
# directly, or use the apt-install and in-target commands to easily install
|
||||
# packages and run commands in the target system.
|
||||
d-i preseed/late_command string \
|
||||
in-target sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/' /etc/default/grub; \
|
||||
in-target sed -i -E 's/GRUB_TIMEOUT=.*/GRUB_TIMEOUT=0/g' /etc/default/grub; \
|
||||
in-target sed -i -E 's/GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR="ОСГОС"/g' /etc/default/grub; \
|
||||
in-target grub-mkconfig -o /boot/grub/grub.cfg; \
|
||||
in-target sed -i 's/XKBLAYOUT="us,ru"/XKBLAYOUT="ru,us"/g' /etc/default/keyboard; \
|
||||
in-target gtk-update-icon-cache -f /usr/share/icons/Wings-Light-Icons/
|
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=OSGOS registrator
|
||||
After=network.target auditd.service
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/tmp
|
||||
ExecStart=/sbin/starter
|
||||
KillMode=process
|
||||
Restart=always
|
||||
RestartPreventExitStatus=255
|
||||
Type=idle
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=OSGOS shop
|
||||
After=network.target auditd.service
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/tmp
|
||||
ExecStart=/usr/local/bin/shop
|
||||
KillMode=process
|
||||
Restart=always
|
||||
RestartPreventExitStatus=255
|
||||
Type=idle
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,18 @@
|
|||
###################################################################
|
||||
kernel.dmesg_restrict = 1
|
||||
kernel.kptr_restrict = 2
|
||||
net.core.bpf_jit_harden = 2
|
||||
kernel.perf_event_paranoid = 3
|
||||
kernel.kexec_load_disabled = 1
|
||||
user.max_user_namespaces = 0
|
||||
kernel.unprivileged_bpf_disabled = 1
|
||||
vm.unprivileged_userfaultfd = 0
|
||||
dev.tty.ldisc_autoload = 0
|
||||
vm.mmap_min_addr = 4096
|
||||
kernel.randomize_va_space = 2
|
||||
kernel.yama.ptrace_scope = 3
|
||||
fs.protected_symlinks = 1
|
||||
fs.protected_hardlinks = 1
|
||||
fs.protected_fifos = 2
|
||||
fs.protected_regular = 2
|
||||
fs.suid_dumpable = 0
|
|
@ -0,0 +1,8 @@
|
|||
DESKTOP=Рабочий стол
|
||||
DOWNLOAD=Загрузки
|
||||
TEMPLATES=Шаблоны
|
||||
PUBLICSHARE=Общедоступные
|
||||
DOCUMENTS=Документы
|
||||
MUSIC=Музыка
|
||||
PICTURES=Изображения
|
||||
VIDEOS=Видео
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
.idea
|
||||
log.txt
|
||||
build/*.exe
|
||||
build/*.json
|
||||
build/tmp
|
|
@ -0,0 +1,13 @@
|
|||
module helper
|
||||
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/kr/pretty v0.3.0 // indirect
|
||||
github.com/phillvancejr/webview v0.0.0-20221206143027-74fbdb312cb9
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/stretchr/testify v1.8.0 // indirect
|
||||
golang.org/x/sys v0.5.0 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
)
|
|
@ -0,0 +1,39 @@
|
|||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
|
||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/phillvancejr/webview v0.0.0-20221206143027-74fbdb312cb9 h1:ek/WK3NbYmCbAluFSE7LdNiPZaf4SwbWM7S+d7lZECE=
|
||||
github.com/phillvancejr/webview v0.0.0-20221206143027-74fbdb312cb9/go.mod h1:IwyNHbaQWwzmIIdnSNASTlZOFbEv+ws2+gqx3io2kC0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
@ -0,0 +1,117 @@
|
|||
// OSGOS helper
|
||||
// =======================================================================================================
|
||||
// Author: LLC Texnico <main@texnico.ru>
|
||||
// All rights reserved
|
||||
// Russia, Chelyabinsk, 2022-2024
|
||||
|
||||
package main
|
||||
|
||||
/*
|
||||
#cgo linux openbsd freebsd pkg-config: gtk+-3.0 webkit2gtk-4.0
|
||||
#include <gtk/gtk.h>
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/phillvancejr/webview"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"math/rand"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
port *int
|
||||
)
|
||||
|
||||
func init() {
|
||||
log.SetFormatter(&log.TextFormatter{
|
||||
DisableQuote: true,
|
||||
})
|
||||
log.SetLevel(log.InfoLevel)
|
||||
log.SetOutput(os.Stdout)
|
||||
}
|
||||
|
||||
//# Если в Windows 10 появляется белый экран при загрузке каких-либо окон, то нужно установить WebView 2
|
||||
//https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution
|
||||
|
||||
//# Если в Windows 10 не открывается loopback, то под администратором надо выполнить:
|
||||
//CheckNetIsolation.exe LoopbackExempt -a -n="Microsoft.Win32WebViewHost_cw5n1h2txyewy"
|
||||
|
||||
//# Linux build command
|
||||
//$ go build -o helper
|
||||
|
||||
//# Windows requires special linker flags for GUI apps.
|
||||
//# It's also recommended to use TDM-GCC-64 compiler for CGo.
|
||||
//# http://tdm-gcc.tdragon.net/download
|
||||
//$ go build -ldflags="-H windowsgui" -o helper.exe
|
||||
|
||||
func main() {
|
||||
interrupt := make(chan os.Signal, 1)
|
||||
signal.Notify(interrupt, os.Interrupt, syscall.SIGTERM)
|
||||
|
||||
section := flag.String("section", "help", "целевая папка")
|
||||
folder := flag.String("folder", "/usr/share/doc/osgos", "путь до ресурсов")
|
||||
maximized := flag.Bool("max", false, "запустить максимального размера")
|
||||
minimized := flag.Bool("min", false, "запустить минимального размера")
|
||||
fixed := flag.Bool("fixed", false, "размер не изменяем")
|
||||
debug := flag.Bool("debug", false, "уровень логов для отладки")
|
||||
width := flag.Int("width", 800, "ширина окна")
|
||||
height := flag.Int("height", 700, "высотка окна")
|
||||
top := flag.Bool("topmost", false, "поверх всех окон")
|
||||
port = flag.Int("port", 0, "порт")
|
||||
flag.Parse()
|
||||
|
||||
if *port == 0 {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
*port = int(rand.Int31n(1024)) + 10000
|
||||
}
|
||||
|
||||
if *debug {
|
||||
log.SetLevel(log.DebugLevel)
|
||||
log.SetOutput(nil)
|
||||
logFile, _ := os.OpenFile("log.txt", os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.ModePerm)
|
||||
log.SetOutput(io.MultiWriter(logFile, os.Stdout))
|
||||
log.Infof("truncate log file")
|
||||
}
|
||||
|
||||
log.Infof("started with log level: %v", log.GetLevel().String())
|
||||
|
||||
go webThread(*folder, *section)
|
||||
|
||||
w := webview.New(false)
|
||||
if w == nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
var t webview.Hint
|
||||
if *maximized {
|
||||
t = webview.HintNone
|
||||
C.gtk_window_fullscreen((*C.GtkWindow)(w.Window()))
|
||||
} else if *minimized {
|
||||
t = webview.HintMin
|
||||
} else if *fixed {
|
||||
t = webview.HintFixed
|
||||
} else {
|
||||
t = webview.HintNone
|
||||
}
|
||||
|
||||
if *top {
|
||||
w.Topmost(true)
|
||||
}
|
||||
|
||||
defer w.Destroy()
|
||||
w.SetTitle("ОСГОС")
|
||||
w.SetSize(*width, *height, t)
|
||||
w.Center() // Center the window
|
||||
w.NoCtx() // remove the right click context menu
|
||||
w.Navigate(fmt.Sprintf("http://127.0.0.1:%d/%s/index.html", *port, *section))
|
||||
w.Run()
|
||||
|
||||
log.Infof("finished")
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
// OSGOS helper
|
||||
// =======================================================================================================
|
||||
// Author: LLC Texnico <main@texnico.ru>
|
||||
// All rights reserved
|
||||
// Russia, Chelyabinsk, 2022-2024
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"math/rand"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
mutexRandom sync.Mutex
|
||||
counterRandom int64
|
||||
)
|
||||
|
||||
func RandomString(l int) string {
|
||||
mutexRandom.Lock()
|
||||
counterRandom++
|
||||
rand.Seed(time.Now().UTC().UnixNano() + counterRandom)
|
||||
var result bytes.Buffer
|
||||
var temp string
|
||||
for i := 0; i < l; {
|
||||
t := RandInt(0, 3)
|
||||
if t == 1 {
|
||||
temp = string(rune(RandInt(48, 58)))
|
||||
} else if t == 2 {
|
||||
temp = string(rune(RandInt(65, 91)))
|
||||
} else {
|
||||
temp = string(rune(RandInt(97, 123)))
|
||||
}
|
||||
result.WriteString(temp)
|
||||
i++
|
||||
}
|
||||
mutexRandom.Unlock()
|
||||
return result.String()
|
||||
}
|
||||
|
||||
func RandomStringOnlyAlphabetic(l int) string {
|
||||
mutexRandom.Lock()
|
||||
counterRandom++
|
||||
rand.Seed(time.Now().UTC().UnixNano() + counterRandom)
|
||||
var result bytes.Buffer
|
||||
var temp string
|
||||
for i := 0; i < l; {
|
||||
t := RandInt(0, 2)
|
||||
if t == 1 {
|
||||
temp = string(rune(RandInt(97, 123)))
|
||||
} else {
|
||||
temp = string(rune(RandInt(65, 91)))
|
||||
}
|
||||
result.WriteString(temp)
|
||||
i++
|
||||
}
|
||||
mutexRandom.Unlock()
|
||||
return result.String()
|
||||
}
|
||||
|
||||
func RandFloat(min float64, max float64) float64 {
|
||||
return min + rand.Float64()*(max-min)
|
||||
}
|
||||
|
||||
func RandInt(min int, max int) int {
|
||||
return min + rand.Intn(max-min)
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
// OSGOS helper
|
||||
// =======================================================================================================
|
||||
// Author: LLC Texnico <main@texnico.ru>
|
||||
// All rights reserved
|
||||
// Russia, Chelyabinsk, 2022-2024
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/gorilla/mux"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
func webThread(folder, section string) {
|
||||
log.Infof("web thread started on %d", *port)
|
||||
|
||||
myRouter := mux.NewRouter().StrictSlash(true)
|
||||
myRouter.Use(handleCORS)
|
||||
myRouter.PathPrefix(fmt.Sprintf("/%s", section)).HandlerFunc(wrapper(folder, handleFile))
|
||||
myRouter.PathPrefix("/ping").HandlerFunc(handlePing)
|
||||
myRouter.PathPrefix("/quit").HandlerFunc(handleQuit)
|
||||
|
||||
err := http.ListenAndServe(":"+fmt.Sprint(*port), myRouter)
|
||||
if err != nil {
|
||||
log.Errorf("http error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func wrapper(folder string, f func(folder string, w http.ResponseWriter, r *http.Request)) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
f(folder, w, r)
|
||||
}
|
||||
}
|
||||
|
||||
func handleFile(folder string, w http.ResponseWriter, r *http.Request) {
|
||||
if _, err := os.Stat(folder + r.URL.Path); err == nil {
|
||||
http.ServeFile(w, r, folder+r.URL.Path)
|
||||
} else {
|
||||
http.Error(w, "Файл не найден", http.StatusNotFound)
|
||||
}
|
||||
}
|
||||
|
||||
func handlePing(w http.ResponseWriter, _ *http.Request) {
|
||||
_, _ = w.Write([]byte("ok"))
|
||||
}
|
||||
|
||||
func handleQuit(_ http.ResponseWriter, _ *http.Request) {
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
func handleCORS(h http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
w.Header().Set("Access-Control-Allow-Methods", "POST, GET, PUT, DELETE, OPTIONS")
|
||||
w.Header().Set("Access-Control-Allow-Credentials", "true")
|
||||
w.Header().Set("Access-Control-Max-Age", "6400")
|
||||
w.Header().Set("Access-Control-Allow-Headers", "Authorization, Content-Type, Accept")
|
||||
|
||||
if r.Method == http.MethodOptions {
|
||||
_, _ = w.Write([]byte("ok"))
|
||||
return
|
||||
}
|
||||
|
||||
h.ServeHTTP(w, r)
|
||||
})
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
.idea
|
||||
build/*.*
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,72 @@
|
|||
html {
|
||||
padding-top: 25px;
|
||||
background-color: #A0A0A0;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #A0A0A0;
|
||||
}
|
||||
|
||||
legend, label {
|
||||
color: white;
|
||||
}
|
||||
|
||||
div {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.holder {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 500px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.row {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.r {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.l {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.b select {
|
||||
width: 165px;
|
||||
}
|
||||
|
||||
.b button {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
div.b {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 0 auto;
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#copyright {
|
||||
text-align: center;
|
||||
font-size: 6pt;
|
||||
color: white;
|
||||
}
|
|
@ -0,0 +1,162 @@
|
|||
String.prototype.replaceAll = function (search, replace) {
|
||||
return this.split(search).join(replace);
|
||||
};
|
||||
|
||||
// Array Remove - By John Resig (MIT Licensed)
|
||||
Array.prototype.remove = function (from, to) {
|
||||
let rest = this.slice((to || from) + 1 || this.length);
|
||||
this.length = from < 0 ? this.length + from : from;
|
||||
return this.push.apply(this, rest);
|
||||
};
|
||||
|
||||
function formatDate(date) {
|
||||
let d = new Date(date);
|
||||
return d.toLocaleString();
|
||||
}
|
||||
|
||||
function exit() {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '/quit', false);
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
function putCopyright() {
|
||||
document.getElementById('copyright').innerHTML = 'Copyright © 2022-' + new Date().getFullYear() + ' <a href="https://osgos.ru">ООО Технологии и Коммуникации</a>'
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Base64 encode / decode
|
||||
* http://www.webtoolkit.info/
|
||||
*
|
||||
**/
|
||||
let Base64 = {
|
||||
|
||||
// private property
|
||||
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||
|
||||
// public method for encoding
|
||||
encode: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
||||
input = Base64._utf8_encode(input);
|
||||
|
||||
while (i < input.length) {
|
||||
|
||||
chr1 = input.charCodeAt(i++);
|
||||
chr2 = input.charCodeAt(i++);
|
||||
chr3 = input.charCodeAt(i++);
|
||||
|
||||
enc1 = chr1 >> 2;
|
||||
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
||||
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
||||
enc4 = chr3 & 63;
|
||||
|
||||
if (isNaN(chr2)) {
|
||||
enc3 = enc4 = 64;
|
||||
} else if (isNaN(chr3)) {
|
||||
enc4 = 64;
|
||||
}
|
||||
|
||||
output = output +
|
||||
this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
|
||||
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
||||
|
||||
}
|
||||
|
||||
return output;
|
||||
},
|
||||
|
||||
// public method for decoding
|
||||
decode: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
|
||||
while (i < input.length) {
|
||||
|
||||
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << 6) | enc4;
|
||||
|
||||
output = output + String.fromCharCode(chr1);
|
||||
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
output = Base64._utf8_decode(output);
|
||||
|
||||
return output;
|
||||
|
||||
},
|
||||
|
||||
// private method for UTF-8 encoding
|
||||
_utf8_encode: function (string) {
|
||||
string = string.replace(/\r\n/g, "\n");
|
||||
var utftext = "";
|
||||
|
||||
for (var n = 0; n < string.length; n++) {
|
||||
|
||||
var c = string.charCodeAt(n);
|
||||
|
||||
if (c < 128) {
|
||||
utftext += String.fromCharCode(c);
|
||||
} else if ((c > 127) && (c < 2048)) {
|
||||
utftext += String.fromCharCode((c >> 6) | 192);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
} else {
|
||||
utftext += String.fromCharCode((c >> 12) | 224);
|
||||
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return utftext;
|
||||
},
|
||||
|
||||
// private method for UTF-8 decoding
|
||||
_utf8_decode: function (utftext) {
|
||||
var string = "";
|
||||
var i = 0;
|
||||
var c = c1 = c2 = 0;
|
||||
|
||||
while (i < utftext.length) {
|
||||
|
||||
c = utftext.charCodeAt(i);
|
||||
|
||||
if (c < 128) {
|
||||
string += String.fromCharCode(c);
|
||||
i++;
|
||||
} else if ((c > 191) && (c < 224)) {
|
||||
c2 = utftext.charCodeAt(i + 1);
|
||||
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
||||
i += 2;
|
||||
} else {
|
||||
c2 = utftext.charCodeAt(i + 1);
|
||||
c3 = utftext.charCodeAt(i + 2);
|
||||
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
||||
i += 3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Регистрация</title>
|
||||
<link rel="shortcut icon" href="favicon.svg" type="image/svg+xml">
|
||||
<link rel="icon" href="favicon.svg" type="image/svg+xml">
|
||||
<link rel="stylesheet" href="mini-default.min.css">
|
||||
<link rel="stylesheet" href="common.css">
|
||||
<script src="common.js"></script>
|
||||
|
||||
<script>
|
||||
function ping() {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'http://localhost:10001/ping', false);
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
function send(act) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
let params = 'ip=' + encodeURIComponent(document.getElementById('gi1-ip').value)
|
||||
+ '&domain=' + encodeURIComponent(document.getElementById('gi1-domain').value);
|
||||
if (act === 'domain') {
|
||||
if (document.getElementById('gi1-ip').value.size === 0) {
|
||||
toast("необходимо ввести IP")
|
||||
return;
|
||||
}
|
||||
if (document.getElementById('gi1-domain').value.size === 0) {
|
||||
toast("необходимо ввести имя домена")
|
||||
return;
|
||||
}
|
||||
xhr.open('GET', 'http://localhost:10001/domain?' + params, false);
|
||||
}
|
||||
xhr.send();
|
||||
if (xhr.status !== 200) {
|
||||
toast(xhr.responseText)
|
||||
} else {
|
||||
toast("данные сохранены")
|
||||
}
|
||||
}
|
||||
|
||||
function toast(message) {
|
||||
let w = document.getElementById("toast");
|
||||
w.innerText = message;
|
||||
w.style.display = "block";
|
||||
setTimeout(function () {
|
||||
w.style.display = "none";
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
function back() {
|
||||
document.location = 'success.html'
|
||||
}
|
||||
|
||||
setInterval(function () {
|
||||
ping()
|
||||
}, 1000)
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="putCopyright();">
|
||||
<div class="holder">
|
||||
<div class="content">
|
||||
<img src="logo.png" alt="logo">
|
||||
<fieldset>
|
||||
<legend class="doc">Домен</legend>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 r">
|
||||
<label for="gi1-domain" class="doc">Имя домена</label>
|
||||
</div>
|
||||
<div class="col-sm-6 l">
|
||||
<input type="text" value="" id="gi1-domain" placeholder="domain.local" class="doc">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6 r">
|
||||
<label for="gi1-ip" class="doc">IP-адрес сервера</label>
|
||||
</div>
|
||||
<div class="col-sm-6 l">
|
||||
<input type="text" value="" id="gi1-ip" placeholder="x.x.x.x" class="doc">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<input type="button" id="btn-try" class="tertiary" value="Сохранить" onclick="send('domain')"/>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<input type="button" id="btn-clear" class="primary" value="Назад" onclick="back()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<span class="toast" id="toast" style="display: none"></span>
|
||||
</div>
|
||||
<div class="center" id="copyright"></div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1 @@
|
|||
<svg enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><g id="_x32_6_Fill_Up_A_Form"><g><path d="m362.245 63.289v76.554l-159.216 159.215-23.056 65.768c-2.178 6.375 3.878 12.538 10.253 10.253l65.769-23.003 106.25-106.197v202.884c0 24.438-19.816 44.147-44.2 44.147h-267.538c-24.384 0-44.2-19.709-44.2-44.147v-385.474c0-24.437 19.816-44.2 44.2-44.2h267.538c24.384 0 44.2 19.763 44.2 44.2z" fill="#cce0f1"/><g><path d="m295.406 89.218h-222.274c-2.936 0-5.313-2.379-5.313-5.313s2.376-5.313 5.313-5.313h222.274c2.936 0 5.313 2.379 5.313 5.313s-2.376 5.313-5.313 5.313z" fill="#36474f"/></g><g><path d="m183.563 147.573h-110.431c-2.936 0-5.313-2.379-5.313-5.313s2.376-5.313 5.313-5.313h110.432c2.936 0 5.313 2.379 5.313 5.313s-2.377 5.313-5.314 5.313z" fill="#36474f"/></g><g><path d="m256.024 205.927h-182.892c-2.936 0-5.313-2.379-5.313-5.313s2.376-5.313 5.313-5.313h182.892c2.936 0 5.313 2.379 5.313 5.313s-2.376 5.313-5.313 5.313z" fill="#36474f"/></g><g><path d="m207.081 264.282h-133.949c-2.936 0-5.313-2.379-5.313-5.313s2.376-5.313 5.313-5.313h133.949c2.936 0 5.313 2.379 5.313 5.313s-2.377 5.313-5.313 5.313z" fill="#36474f"/></g><g><path d="m155.538 322.636h-82.406c-2.936 0-5.313-2.379-5.313-5.313s2.376-5.313 5.313-5.313h82.406c2.936 0 5.313 2.379 5.313 5.313s-2.377 5.313-5.313 5.313z" fill="#36474f"/></g><g><path d="m183.563 380.991h-110.431c-2.936 0-5.313-2.379-5.313-5.313s2.376-5.313 5.313-5.313h110.432c2.936 0 5.313 2.379 5.313 5.313s-2.377 5.313-5.314 5.313z" fill="#36474f"/></g><g><path d="m296.257 439.345h-223.125c-2.936 0-5.313-2.379-5.313-5.313s2.376-5.313 5.313-5.313h223.125c2.936 0 5.313 2.379 5.313 5.313s-2.377 5.313-5.313 5.313z" fill="#36474f"/></g><path d="m179.973 364.826c-2.178 6.375 3.878 12.538 10.253 10.253l65.769-23.003 106.25-106.197v22.525l-97.538 97.537-69.222 24.225c-10.574 3.6-21.522-.406-27.519-8.871-4.463-6.322-5.578-14.503-2.975-21.782l24.172-69.169 173.081-173.027v22.525l-159.215 159.216z" opacity=".1"/><path d="m501.008 107.102-244.983 244.984-65.788 23.014c-6.313 2.241-12.492-3.937-10.252-10.252l23.016-65.786 244.984-244.983c6.246-6.246 16.294-6.246 22.539-.001l30.483 30.483c6.248 6.247 6.248 16.295.001 22.541z" fill="#3eb655"/><path d="m469.017 139.094 31.991-31.991c6.246-6.246 6.246-16.294-.001-22.541l-30.483-30.483c-6.245-6.245-16.293-6.245-22.539.001l-31.991 31.99z" fill="#d81a60"/><path d="m256.025 352.086-65.768 23.015c-6.374 2.23-12.5-3.896-10.27-10.27l23.015-65.768z" fill="#faa629"/></g></g></svg>
|
After Width: | Height: | Size: 2.5 KiB |
|
@ -0,0 +1,139 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Регистрация</title>
|
||||
<link rel="shortcut icon" href="favicon.svg" type="image/svg+xml">
|
||||
<link rel="icon" href="favicon.svg" type="image/svg+xml">
|
||||
<link rel="stylesheet" href="mini-default.min.css">
|
||||
<link rel="stylesheet" href="common.css">
|
||||
<script src="common.js"></script>
|
||||
|
||||
<script>
|
||||
function ping() {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'http://localhost:10001/ping', false);
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
function get() {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'http://localhost:10001/get', false);
|
||||
xhr.send();
|
||||
if (xhr.status === 200) {
|
||||
if (xhr.responseText.length === 0) {
|
||||
return;
|
||||
}
|
||||
let item = JSON.parse(xhr.responseText);
|
||||
if (!item) {
|
||||
return;
|
||||
}
|
||||
|
||||
document.getElementById('gi1-a123').value = item.RegNum;
|
||||
document.getElementById('gi1-a321').value = item.ContNum;
|
||||
document.getElementById('gi1-email').value = item.Email;
|
||||
} else {
|
||||
document.getElementById('gi1-a123').value = "";
|
||||
document.getElementById('gi1-a321').value = "";
|
||||
document.getElementById('gi1-email').value = "";
|
||||
}
|
||||
}
|
||||
|
||||
function send(act) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
let params = 'a123=' + encodeURIComponent(document.getElementById('gi1-a123').value)
|
||||
+ '&a321=' + encodeURIComponent(document.getElementById('gi1-a321').value)
|
||||
+ '&email=' + encodeURIComponent(document.getElementById('gi1-email').value);
|
||||
if (act === 'reg') {
|
||||
if (!document.getElementById('gi1-checkbox').checked) {
|
||||
toast("необходимо подтвердить данные")
|
||||
return;
|
||||
}
|
||||
xhr.open('GET', 'http://localhost:10001/reg?' + params, false);
|
||||
} else if (act === 'clean') {
|
||||
xhr.open('GET', 'http://localhost:10001/clean', false);
|
||||
}
|
||||
xhr.send();
|
||||
if (xhr.status !== 200) {
|
||||
toast(xhr.responseText)
|
||||
} else if (act === 'reg') {
|
||||
window.location.replace("success.html")
|
||||
} else if (act === 'clean') {
|
||||
get()
|
||||
}
|
||||
}
|
||||
|
||||
function toast(message) {
|
||||
let w = document.getElementById("toast");
|
||||
w.innerText = message;
|
||||
w.style.display = "block";
|
||||
setTimeout(function () {
|
||||
w.style.display = "none";
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
setInterval(function () {
|
||||
ping()
|
||||
}, 1000)
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="putCopyright(); get();">
|
||||
<div class="holder">
|
||||
<div class="content">
|
||||
<img src="logo.png" alt="logo">
|
||||
<fieldset>
|
||||
<legend class="doc">Регистрация</legend>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 r">
|
||||
<label for="gi1-a123" class="doc">Номер контракта</label>
|
||||
</div>
|
||||
<div class="col-sm-6 l">
|
||||
<input type="text" value="" id="gi1-a123" placeholder="контракт" class="doc">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6 r">
|
||||
<label for="gi1-a321" class="doc">Номер поставки</label>
|
||||
</div>
|
||||
<div class="col-sm-6 l">
|
||||
<input type="text" value="" id="gi1-a321" placeholder="поставка" class="doc">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6 r">
|
||||
<label for="gi1-email" class="doc">Эл.почта</label>
|
||||
</div>
|
||||
<div class="col-sm-6 l">
|
||||
<input type="text" value="" id="gi1-email" placeholder="эл.почта" class="doc">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 r">
|
||||
<label for="gi1-checkbox">Я подтверждаю правильность введенных данных</label>
|
||||
<input type="checkbox" id="gi1-checkbox" class="doc">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<input type="button" id="btn-try" class="tertiary" value="Отправить" onclick="send('reg')"/>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<input type="button" id="btn-clear" class="primary" value="Очистить" onclick="send('clean')"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<span class="toast" id="toast" style="display: none"></span>
|
||||
</div>
|
||||
<div class="center" id="copyright"></div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 4.5 KiB |