From cfa9a9e0c15ed7f9f4390ee830a448adf2a1aec4 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 25 Jan 2017 13:55:14 +0100 Subject: [PATCH] disable all services at boot to test troubles --- clone/.clone.swp | Bin 20480 -> 0 bytes clone/clone | 6 +++--- clone/utility/booting_script | 28 ++++++++++++++++++++++------ clone/utility/shadow_append | 3 ++- 4 files changed, 27 insertions(+), 10 deletions(-) delete mode 100644 clone/.clone.swp diff --git a/clone/.clone.swp b/clone/.clone.swp deleted file mode 100644 index e539ed3c22d14a869ced97eb4b15fb2860b5fe92..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20480 zcmeI3Yiu0Xb%4iKoK&f0r%iqoeL$B>LL_Z3m!v3C50lZ0vQ&t%KuS~`txOGfX2~&k zXVx>bqG(x8ff#60AW55NQ?zM}x=orkZJo4e;>1n*qmf&?vEAg4i=ys3PFtjDi@s2! z?RW0n*`0k*l1&2zie2F2Vs`G_$GPX8d(OGT<TP=SNy9EF5*CH6AIfc=3qb8S#QbC0McR z@oGNW@JoeKCGg$k?=|b~-Rw!ACxPoopdOd=dv{p7$HzvcWPh$tz4iOgT<4+Q?VbdB z66i^wCxM;>dJ^bKpeKQz1bPzq|0IF9w#|As1G?D^>b>Th@Lzw@?>Ct14fFkz<~zN= z&0L=~-`mWM^uGDI_tld?PXav&^d!)eKu-ca3G^h;lR!@bJqh$A(33z<0{;gRupP^i z1Hqak0670o9)~%23w+~yEbEWqNq7XVz#2RN%Wwgf z;C?s{MK}is;TCx1O_ueC@CWdDSb_og_8TqhWw;9WK@R%hcDN1R2ycLGa5LNl7W~gG zmi6E8GJF;uhl@~$vv51y2CtB;`7ihv_$T--{3Cn^UW8A;M<9X_9)v|0gSWxcBy+C9 z&w>lb;bwRY9eF>z4@6%Ac(tGHZfP}8IVGPNr3!9bD%9*KT6b~>ENgpMRcfRVS8Ii6 z)pmmQ1J?GE9k=|XA2oj-R#DvvRP4H{Q1xS7Tk@dV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a%fM zYnMqrQw^Efze_K?^aZiWt&6X-t)}QEyNFJHG8sAXaQ1ZZaF*?8HI#(6DJPk`&Agko zvL*|r?Lf^dj3l=^tV!!rsVm-AtW%wX+J=6o!ed3IRU1==J~jrHeNQ)e{aNyf?K!08 Y%h7r6w#4mid9$RB>nN9LsHL9&1^5ojnE(I) diff --git a/clone/clone b/clone/clone index 0e02f36..23489c4 100755 --- a/clone/clone +++ b/clone/clone @@ -181,7 +181,7 @@ step7(){ test ! -e ./server/authorized_keys && touch ./server/authorized_keys; cat ./tmp/id_ecdsa.pub >> ./server/authorized_keys; - # (3) Create ssh file system # +# (3) Create ssh file system # echo " (.) Init ssh folder (/home/sats/.ssh)"; sudo mkdir -p /mnt/home/sats/.ssh; @@ -209,7 +209,7 @@ step7(){ # (8) Set up automatic ssh server at start up # echo " (.) Emulate \`systemctl enable ssh.service\`"; - sudo ln -fs /lib/systemd/system/ssh.service /mnt/etc/systemd/system/ssh.service; + #sudo ln -fs /lib/systemd/system/ssh.service /mnt/etc/systemd/system/ssh.service; # (9) Define config alias with ssh-key # echo " (.) Define alias config"; @@ -289,7 +289,7 @@ step10(){ # (4) Enable startup service unit # echo " (.) Emulate \`systemctl enable sats.service\`"; sudo mkdir -p /mnt/etc/systemd/system/multi-user.target.wants; - sudo ln -fs /lib/systemd/system/sats.service /mnt/etc/systemd/system/multi-user.target.wants/sats.service; + #sudo ln -fs /lib/systemd/system/sats.service /mnt/etc/systemd/system/multi-user.target.wants/sats.service; # (5) Adjust permissions # echo " (.) Adjust permissions"; diff --git a/clone/utility/booting_script b/clone/utility/booting_script index bbf174e..31cd024 100644 --- a/clone/utility/booting_script +++ b/clone/utility/booting_script @@ -3,13 +3,29 @@ # [1] first install (install source code) if [ -e /home/sats/satsd/first_install ]; then - # install source code - git clone ssh://smmp-server/satsd /home/sats/satsd/source \ - && rm /home/sats/satsd/first_install \ - || exit; + git 2> /dev/null > /dev/null; + + usegit=1; -fi + test $? -ne 0 && usegit=0; + + # install source code + if [ "$usegit" -eq 1 ]; then + + git clone ssh://smmp-server/satsd/git /home/sats/satsd/source \ + && rm /home/sats/satsd/first_install \ + || exit; + + else + + # temporary replacement (without git) + scp -r smmp-server:/satsd/scp/source /home/sats/satsd/ \ + && rm /home/sats/satsd/first_install \ + || exit; + fi; + +fi; # [2] Propagate script -sh /home/sats/satsd/source/boot $*; +sh /home/sats/satsd/source/boot $* 2>> /home/sats/satsd/log/boot.log >> /home/sats/satsd/log/boot.log; diff --git a/clone/utility/shadow_append b/clone/utility/shadow_append index 3578688..92b3855 100644 --- a/clone/utility/shadow_append +++ b/clone/utility/shadow_append @@ -1,2 +1,3 @@ pi:$6$k0vFWRoG$bEBdFcFBWw2fLEA.5LsVKOtLWdWSkZMnEikqOG4jHCneRrWEBnEt6.ROe60ggdA7DbdU.l2ZO35WFvi3q6Ays/:17130:0:99999:7::: -sats:$6$NvC.M5Yz$IRr1rOWhgSQNstmaZK9VLHJzqHebJaEBDaro8M6WyeWQjdLyas4cg5qDwziTVLBC9CI22sPGY.us8saZW0xMl0:17185:0:999999:7:: +sats:$6$k0ddNARW$TDcFuts/WK62gt5QIlFCqN.4MSwj4Q3SsJZ6tUvcbjZXjt2TsiVdkkv9PgO/0yR.on8.Aj2/.WHHU28GXwdo51:17185:0:999999:7:: +