2 # Copyright (C) 2016 Ian Kelling
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
20 exec &> >(sudo
tee -a /var
/log
/distro-end
)
21 echo "$0: $(date): starting now)"
23 src
="${BASH_SOURCE%/*}"
27 IFS
= read -r -d '' y ||
:
31 spa
() { # simple package add
60 # swh-plugins is for karaoke pulsaudio filter.
87 transmission-remote-gtk
95 ########### begin section including li ################
100 if [[ `debian-archive` == testing
]]; then
113 # ubuntu 14.04 uses b-cron,
114 # but its not maintained in arch.
115 # of the ones in the main repos, cronie is only one maintained.
116 # fcron appears abandoned software.
120 *) : ;; # other distros come with cron.
150 arch
) spa the_silver_searcher
;;
151 debian|ubuntu
) spa silversearcher-ag
;;
156 debian|ubuntu
) spa ntp
;;
165 # no equivalent in other distros:
170 # for debconf-get-selections
176 ubuntu|debian
) spa ack-grep
;;
177 arch|fedora
) spa ack
;;
193 case $
(distro-name
) in
195 # allows me to pipe with ssh -t, and gets rid of spam
196 # http://forums.debian.net/viewtopic.php?f=5&t=85822
197 # i'd rather disable the service than comment the init file
198 # this says disabling the service, it will still get restarted
199 # but this script doesn't do anything on restart, so it should be fine
200 s
dd of
=/var
/run
/motd.dynamic
if=/dev
/null
201 # stretch doesn't have initscripts pkg installed by default
202 if [[ $
(debian-codename
) == jessie
]]; then
203 s update-rc.d motd disable
207 # this isn't a complete solution. It still shows me when updates are available,
208 # but it's no big deal.
209 s t
/etc
/update-motd.d
/10-help-text /etc
/update-motd.d
/00-header
215 # https://debian-handbook.info/browse/stable/sect.regular-upgrades.html
216 # /etc/cron.daily/apt calls unattended-upgrades
217 # /usr/share/doc/unattended-upgrades# cat README.md
218 # /etc/apt/apt.conf.d/50unattended-upgrades
220 setup-debian-auto-update
223 # we've got a few dependencies later on, so install them now.
224 pi
"${simple_packages[@]}"
231 lj
) domain
=iank.bid
;;
232 li
) domain
=iankelling.org
;;
234 /a
/h
/setup.sh
$domain
237 sudo
-E /a
/bin
/mediawiki-setup
/mw-setup-script
240 echo "$0: $(date): ending now)"
245 ########### end section including li/lj ###############
249 arch
) pi syncthing
;;
251 # google led me here:
252 # https://apt.syncthing.net/
253 curl
-s https
://syncthing.net
/release-key.txt | sudo apt-key add
-
254 s
="deb http://apt.syncthing.net/ syncthing release"
255 if [[ $
(cat /etc
/apt
/sources.list.d
/syncthing.list
) != $s ]]; then
256 echo "$s" | s
dd of
=/etc
/apt
/sources.list.d
/syncthing.list
262 # installed via f-droid
263 # top right, actions, device id
265 # for installing on a remote comp:
266 # ssh -L 8384:localhost:8384 -N frodo
267 # went to http://localhost:8384/
269 # add folder to sync phone,
270 # staggered file versioning would be my normal choice, but choose
271 # trash can versioning for sake of space on phone, with
272 # clean out after 7 days.
274 # did ser syncthing@ian start
275 # then on phone, add device, hit bar code icon,
276 # install bar code scanner.
279 # no equivalent in other distros:
282 # for gui bug reporting
288 ####### misc packages ###########
291 if [[ $HOSTNAME == frodo
]]; then
294 # note i had to do this, which is persistent:
296 # s chgrp debian-transmission torrents partial-torrents
298 # syslog says things like
299 # 'Failed to set receive buffer: requested 4194304, got 425984'
300 # google suggets giving it even more than that
301 tu
/etc
/sysctl.conf
<<'EOF'
302 net.core.rmem_max = 67108864
303 net.core.wmem_max = 16777216
307 # some reason it doesn't seem to start automatically anyways
308 pi-nostart transmission-daemon
309 # config file documented here, and it's the same config
310 # for daemon vs client, so it's documented in the gui.
311 # https://trac.transmissionbt.com/wiki/EditConfigFiles#Options
314 p = '/etc/transmission-daemon/settings.json'
315 File.write(p, JSON.pretty_generate(JSON.parse(File.read(p)).merge({
316 'rpc-whitelist' => '127.0.0.1,192.168.1.*',
317 'rpc-authentication-required' => false,
318 'incomplete-dir' => '/i/k/partial-torrents',
319 'download-dir' => '/i/k/torrents',
320 "speed-limit-up" => 700,
321 "speed-limit-up-enabled" => true,
322 "ratio-limit" => 1.4000,
323 "ratio-limit-enabled" => true,
326 sgo transmission-daemon
329 # todo, setup it's config file & daemon
335 # adapted from /var/lib/dpkg/info/transmission-daemon.postinst
336 if ! getent passwd debian-transmission
> /dev
/null
; then
342 --home-dir /var
/lib
/transmission-daemon \
351 --disabled-password \
352 --home /var
/lib
/transmission-daemon \
358 # dunno why it's there, but get rid of it
360 li|lj
) s
rm -rf /home
/linode
;;
363 # arch had a default config,
364 # debian had nothing until you start it.
365 # With a little trial an error, here is a minimal config
366 # taken from the generated one, plus changes that the
367 # settings ui does, without a bunch of ui crap settings.
369 # only settings I set were
373 d
=$f/.config
/transmission-remote-gtk
376 s
-u $u dd of
=$d/config.json
<<'EOF'
380 "profile-name" : "Default",
381 "hostname" : "frodo",
382 "rpc-url-path" : "/transmission/rpc",
385 "auto-connect" : true,
389 "update-active-only" : false,
390 "activeonly-fullsync-enabled" : false,
391 "activeonly-fullsync-every" : 2,
392 "update-interval" : 3,
393 "min-update-interval" : 3,
394 "session-update-interval" : 60,
402 "add-options-dialog" : false
410 # pi-nostart this doesnt seem to be good enough?
411 ser disable openvpn@client
414 # suggests because we want the resolvconf package
415 *) pi
--install-suggests openvpn
;;
425 wget
-nv -N https
://dl.google.com
/linux
/direct
/google-chrome-stable_current_amd64.deb
428 s dpkg
-i google-chrome-stable_current_amd64.deb |
& tee $log
434 # previously I had a more specific search, but dpkg
435 # changed it's output as of 7/2016
436 if grep 'dependency problems' \
437 $log &>/dev
/null
; then
438 s apt-get
-fy install
455 pi cups ghostscript gsfonts
# from arch wiki cups page
456 pi hplip
# from google
457 s gpasswd
-a $USER sys
# from arch wiki
458 sgo org.cups.cupsd.service
459 # goto http://127.0.0.1:631
460 # administration tab, add new printer button.
461 # In debian, I could use hte recommended driver,
462 # in arch, I had to pick out the 6L driver.
467 # other distros unknown
472 ubuntu|debian
) pi
--no-install-recommends mairix notmuch
;;
473 fedora|arch
) spa mairix notmuch
;;
476 arch
) spa nfs-utils
;;
477 ubuntu|debian
) spa nfs-client
;;
480 ubuntu|debian
) spa par2
;;
481 arch|fedora
) spa par2cmdline
;;
484 # needed for my tex resume
486 ubuntu|debian
) spa texlive-full
;;
487 arch
) spa texlive-most
;;
493 # flash, unrar, codecs, ms fonts.
494 # This has a manual prompt.
495 spa ubuntu-restricted-extras
499 # rpm fusion recommended codecs
500 s su
-c "yum localinstall -y --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm"
501 pi gstreamer-plugins-ugly gstreamer-plugins-bad gstreamer-ffmpeg\
502 xine-lib-extras-freeworld
507 # optional dep for firefox for h.264 video
508 arch
) spa gst-libav
;;
509 # other distros, probably come by default
513 fedora|ubuntu|debian
) spa gnupg-agent
;;
519 fedora
) spa pinentry-gtk
;;
520 *) : ;; # comes default or with other packages
524 arch
) spa firefox pulseaudio
;;
525 *) : ;; # comes default or with other packages
530 arch
) spa ttf-dejavu
;;
531 debian|ubuntu
) spa fonts-dejavu
;;
538 debian|ubuntu
) spa x11-utils
;;
543 arch
) pi virt-install
;;&
544 debian|ubuntu
) pi virtinst
;;&
545 *) pi virt-manager
;; # creates the libvirt group in debian at least
548 # allow user to run vms, from debian handbook
549 for x
in ian traci
; do s usermod
-a -G libvirt
,kvm
$x; done
550 # bridge networking as user fails. google lead here, but it doesn't work:
551 # oh well, I give up.
552 # http://wiki.qemu.org/Features-Done/HelperNetworking
554 # f=/etc/qemu/bridge.conf
558 # #s chown root:qemu $f # debian has somethig like qemu-libvirt. equivalent?
564 debian|ubuntu
) spa genisoimage
;;
569 arch
) spa spice-gtk3
;;
570 debian|ubuntu
) spa spice-client-gtk
;;
574 # general known for debian/ubuntu, not for fedora
577 # cdrkit for cloud-init isos
578 # dnsmasq & ebtables for nat networking in libvirt
579 # qemu for qemu-img, bind-tools for dig
580 # dmidecode just because syslog complains
581 pi
unzip xorg-xmodmap dmidecode ebtables\
582 bridge-utils dnsmasq qemu bind-tools
583 # otherwise we get error about accessing kvm module.
584 # seems like there might be a better way, but google was a bit vague.
585 s
sed -ri --follow-symlinks '/^ *user *=/d' /etc
/libvirt
/qemu.conf
586 echo 'user = "root"' | s
tee -a /etc
/libvirt
/qemu.conf
587 # https://bbs.archlinux.org/viewtopic.php?id=206206
588 # # this should prolly go in the wiki
590 # guessing this is not needed
591 #sgo virtlogd.service
598 arch
) pi virtviewer
;;
599 *) : ;; # other distros have it as a dependency afaik.
605 fedora
) cabal
install shellcheck
;;
607 # unknown for older ubuntu
612 arch|debian|ubuntu
) spa pumpa
;;
613 # others unknown. do have a buildscript:
614 # /a/bin/buildscripts/pumpa ;;
619 debian|ubuntu
) spa android-tools-adb
/unstable
;;
620 arch
) spa android-tools
;;
621 # other distros unknown
626 if [[ `debian-archive` == testing
]]; then
627 # has no unstable dependencies
628 spa bitcoin-qt
/unstable
631 # other distros unknown
635 # proprietary flash. going without for now
638 # pi flashplugin-nonfree
646 wget http
://tamacom.com
/global
/global-6.3
.2.
tar.gz
649 # based on https://github.com/leoliu/ggtags
650 .
/configure
--with-exuberant-ctags=/usr
/bin
/ctags
653 s pip
install pygments
669 pi task-cinnamon-desktop
670 # in settings, change scrolling to two-finger,
671 # because the default edge scroll doesn\'t work.
680 # already in debian jessie
686 # note this failed running at the beginning of this file,
687 # because no systemd user instance was running.
688 # Doing systemd --user resulted in
689 # Trying to run as user instance, but $XDG_RUNTIME_DIR is not set
691 if isdebian-testing
; then
692 # as of 7/2016, has no unstable deps, and is not in testing anymore.
699 # ubuntu unknown. probably the same as debian, just check if the
700 # init scripts come with the package.
702 # copied from arch, but moved to etc
703 s
dd of
=/etc
/systemd
/user
/synergys.service
<<'EOF'
705 Description=Synergy Server Daemon
710 ExecStart=/usr/bin/synergys --no-daemon --config /etc/synergy.conf
714 WantedBy=multi-user.target
716 s
dd of
=/etc
/systemd
/user
/synergys.socket
<<'EOF'
718 Conflicts=synergys@.service
725 WantedBy=sockets.target
727 # had this fail with 'Failed to connect to bus: No such file or directory'
728 # then when I tried it manually, it worked fine...
729 systemctl
--user daemon-reload
732 # taken from arch wiki.
733 s
dd of
=/etc
/systemd
/system
/synergyc@.service
<<'EOF'
735 Description=Synergy Client
740 ExecStart=/usr/bin/synergyc --no-daemon frodo
742 # per man systemd.unit, StartLimitInterval, by default we
743 # restart more than 5 times in 10 seconds.
744 # And this param defaults too 200 miliseconds.
748 WantedBy=multi-user.target
750 s systemctl daemon-reload
753 ser
enable synergyc@ian
754 ser start synergyc@ian ||
: # X might not be running yet
757 systemctl
--user start synergys ||
:
758 systemctl
--user enable synergys
765 ######### end misc packages #########
768 # packages I once used before and liked, but don't want installed now for
770 # python-sqlite is used for offlineimap
771 # lxappearance python-sqlite dolphin paman dconf-editor
777 # todo, finish configuring smart.
780 # mostly from https://wiki.archlinux.org/index.php/S.M.A.R.T.
781 # turn on smart. background on options:
782 # first line, -a = test everyting on all devices.
783 # -S on, turn on disk internal saving of vendor specific info,
784 # from google, seems like this is usually already on and fairly standard.
785 # -o on, turn on 4 hour period non-performance degrading testing.
786 # short test daily 2-3am, extended tests Saturdays between 3-4am:
787 sched
="-s (S/../.././02|L/../../6/03)"
788 s
sed -i --follow-symlinks "s#^[[:space:]]*DEVICESCAN.*#\
789 DEVICESCAN -a -o on -S on -n standby,q $sched\
790 -m ian@iankelling.org -M exec /usr/local/bin/smart-notify#" /etc
/smartd.conf
792 # in the default configuration of at least ubuntu 14.04, resolvconf is
793 # configured to order any nameservers associated with tun* or tap*
794 # before the normal internet interfaces, which means they are always
795 # consulted first. This is often slower and undesirable, ie. local dns
796 # queries go from 0ms to 10+ or 100+ ms. To reverse the ordering, you
798 #sudo sed -i --follow-symlinks '/tun\*\|tap\*/d' /etc/resolvconf/interface-order
799 # however, this breaks dns lookup for hosts on the openvpn lan.
800 # I can\'t figure out why hosts on the normal lan would not be
801 # broken under the default ordering, except the host I was
802 # testing with previously had an entry in /etc/hosts.
804 ############# end unfinished
806 ########### misc stuff
809 s cedit
/etc
/goaccess.conf
<<'EOF'
810 # all things found from looking around the default config
811 # copied existing NCSA Combined Log Format with Virtual Host, plus %L
812 log-format %^:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u" %L
815 log-file /var/log/apache2/access.log
820 if [[ $HOSTNAME == frodo
]] && ! sudo
test -e /etc
/openvpn
/client.key
; then
821 /a
/bin
/vpn-setup
/vpn-mk-client-cert dopub
827 case `debian-archive` in
829 s
dd of
=/etc
/apt
/preferences.d
/unison-gtk
<<'EOF'
830 Explanation: Allow unison-gtk to be upgraded
832 Pin: release a=unstable
835 # dont think using testing is needed since I figured out how to
836 # deal with mismatching unison compilers, but I dont
837 # see any reason to revert it, since it only installs
838 # a single package which is primarily a single binary
842 pi unison-gtk
/testing
# after to make it the default unison
851 # default is alsa, doesn\'t work with with pianobar
852 s
dd of
=/etc
/libao.conf
<<'EOF'
858 # not using it atm, and for jessie, it depends on a higher version of btrfs-tools
860 # arch|debian|ubuntu) pi btrbk ;;
864 if [[ $HOSTNAME == treetowl
]] && [[ `debian-archive` != testing
]]; then
865 # fail2 ban is broken, with a workaround, per
866 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770171
867 # ill wait a while to see if it gets fixed
877 debian|ubuntu
) s gpasswd
-a ian adm
;; #needed for reading logs
883 # https://www.torproject.org/docs/rpms.html.en
884 # https://www.torproject.org/docs/debian.html.en
885 # todo: figure out if the running service needs to be restarted upon updates
888 # todo on fedora: setup non-dev packages
890 s
dd of
=/etc
/yum.repos.d
/torproject.repo
<<'EOF'
892 name=Tor experimental repo
894 baseurl=http://deb.torproject.org/torproject.org/rpm/tor-testing/fc/20/$basearch/
896 gpgkey=http://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc
899 name=Tor experimental source repo
902 baseurl=http://deb.torproject.org/torproject.org/rpm/tor-testing/fc/20/SRPMS
904 gpgkey=http://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc
907 # to be secure, take a look at the fingerprint reported from the following install, and see if it matches from the link above:
908 # 3B9E EEB9 7B1E 827B CF0A 0D96 8AF5 653C 5AC0 01F1
910 /a
/bin
/buildscripts
/tor-browser
913 tu
/etc
/apt
/sources.list
"deb http://deb.torproject.org/torproject.org $(debian-codename) main"
914 gpg
--keyserver keys.gnupg.net
--recv 886DDD89
915 gpg
--export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add
-
917 pi deb.torproject.org-keyring
919 /a
/bin
/buildscripts
/tor-browser
923 /a
/bin
/buildscripts
/tor-browser
926 pi tor tor-browser-en
936 fedora todo: disable the firewall or find a way to automate it.
937 there's an unused section in t.org for tramikssion firewall setup
939 fedora manual config for nfs:
941 change to permanent configuration
942 check the box for nfs
943 was hard to figure this out, not sure if this is all needed, but
945 mountd: udp/tcp 20048
946 portmapper, in firewall-config its called rpc-bind: udp/tcp 111
947 troubleshooting, unblock things in rpcinfo -p
948 make sure to reload the firewall to load the persistent configuration
959 pi nfs-utils || pending_reboot
=true
961 # this failed until I rebooted
966 if [[ $HOSTNAME == frodo
]]; then
967 tu
/etc
/exports
<<'EOF'
968 /k 192.168.1.0/24(rw,nohide,no_subtree_check,insecure)
973 if [[ -e /k
/video
]]; then
974 # nohide = export filesystems mounted deeper than the export point
975 # fsid=0 makes this export the "root" export
976 # not documented in the man page, but this means
977 # 1. it can be mounted with a shorthand of server:/
978 # 2. exports that are subdirectories of this one will automatically be mounted
979 tu
/etc
/exports
'/i/video 192.168.1.0/24(rw,fsid=0,nohide,no_root_squash,async,no_subtree_check,insecure)'
981 showmount
-e localhost
989 # persistent virtual machines
997 # distro may not know about win 10 yet.
999 if ! virt-install
--os-variant list
&>/dev
/null
; then # we are using a newer virt-install
1000 for v
in 10 8.1 8; do
1001 if osinfo-query os | gr
"^\s*win${v/./\\.}\s" &>/dev
/null
; then
1008 if ! s virsh list
--all --name |
grep -xF win10
&>/dev
/null
; then
1010 # created account with
1011 # win10vmian@outlook.com, and easy to remember password
1012 # win 10 virtio, makes disk way way way faster
1013 # wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso
1014 # https://wiki.archlinux.org/index.php/QEMU#Change_Existing_Windows_VM_to_use_virtio
1015 # for installing virtio after initial install instead of with initial iso:
1016 # qemu-img create -f qcow2 fake.qcow2 1G
1017 # --disk=/a/images/virtio-win.iso,device=cdrom \
1018 # --disk=/a/images/fake.qcow2,bus=virtio
1020 # went to device manager, saw 2 pci devices with yellow !,
1021 # did search for drivers, pick cdrom location, done.
1023 # from http://www.tenforums.com/tutorials/4189-fast-startup-turn-off-windows-10-a.html.
1024 # google said there was a control panel option for it, but
1025 # that turned out to be a lie.
1026 # Put this in a .bat file and run as administrator to turn off
1027 # hyberboot which fucks things up.
1028 # REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /V HiberbootEnabled /T REG_dWORD /D 0 /F
1029 # power settings, turn off display: never
1030 # run "control userpasswords2", turn on automatic login.
1031 # note: when changing devices, I just undefine, the create the vm again.
1033 s virt-install
--noautoconsole --graphics spice
,listen
=0.0.0.0 \
1034 --disk=/a
/images
/win10.qcow2
,bus
=virtio
--vcpus 2 -r 4096 -w bridge
=br0 \
1035 -n win10
--import --os-variant $variant --cpu host-model-only
1037 s virsh destroy win10
1039 # this one hasn\'t had the virtio fix done yet.
1040 s virt-install
--noautoconsole --graphics spice
,listen
=0.0.0.0 \
1041 --disk=/a
/images
/win7.qcow2
--vcpus 2 -r 4096 -w bridge
=br0 \
1042 -n win7
--import --os-variant win7
--cpu host-model-only
1043 s virsh destroy win7
1044 # had a problem with --cpu host, so trying out
1045 # --cpu host-model-only
1051 # note samba re-reads it's config every 1 minute
1053 arch
) s
cp /etc
/samba
/smb.conf.default
/etc
/samba
/smb.conf
;;
1056 # add 2 lines after workgroup option
1057 s
sed -ri --follow-symlinks '/^\s*encrypt passwords\s*=/d' /etc
/samba
/smb.conf
1058 s
sed -ri --follow-symlinks '/^\s*map to guest\s*=/d' /etc
/samba
/smb.conf
1059 s
sed -i --follow-symlinks 's/\(\s*workgroup\s*=\).*/\1 WORKGROUP\n\tencrypt passwords = yes\n\tmap to guest = bad password/' /etc
/samba
/smb.conf
1060 # remove default homes section. not sharing that.
1061 s
sed -ri --follow-symlinks '/^\s*\[homes\]/,/\s*\[/d' /etc
/samba
/smb.conf
1063 if ! grep -xF '[public]' /etc
/samba
/smb.conf
&>/dev
/null
; then
1064 s
tee -a /etc
/samba
/smb.conf
<<'EOF'
1074 # systemd claims it generates units from /etc/init.d, but it
1075 # clearly doesn\'t in debian. I have no idea how they are
1076 # related. fuck debian right now. It\'s not documented. samba
1077 # has a systemd init file linked to /dev/null. There\'s this
1078 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769714 which
1079 # claims samba\'s sub-services will be started automatically by
1080 # systemd... it didn\'t on install, wonder if it will on
1081 # boot. It clued me in how to start it manually though. Nothing
1082 # in /usr/share/doc/samba, debian admin guide says nothing about
1083 # any of this. (this is in debian testing as of 4/2016).
1085 s
/etc
/init.d
/samba start
1092 tu
/etc
/hosts
<<< "127.0.1.1 $(hostname).lan $(hostname)"
1096 rootdev
=$
(mount |
sed -rn 's#^(\S+) on / .*#\1#p')
1098 tu
/etc
/fstab
<<< "$rootdev /mnt/root btrfs noatime,subvolid=0 0 0"
1099 mountpoint
/mnt
/root || s mount
/mnt
/root
1100 idev
=$
(mount |
sed -rn 's#^(\S+) on /i .*#\1#p')
1101 if [[ $idev != $rootdev ]]; then
1103 tu
/etc
/fstab
<<< "$idev /mnt/iroot btrfs noatime,subvolid=0 0 0"
1104 mountpoint
/mnt
/iroot || s mount
/mnt
/iroot
1108 ######### begin stuff belonging at the end ##########
1111 # Apps we want to override others for default file handler:
1112 # simplest way in debian is to just install them last.
1125 pi
"${simple_packages[@]}"
1128 if $pending_reboot; then
1129 echo "$0: pending reboot and then finished. doing it now."
1132 echo "$0: $(date): ending now)"