060_archive 629 B

123456789101112131415161718
  1. #!/bin/sh
  2. set -e
  3. set -u
  4. POOLPATH="${DAKBASE}/ftp/pool/"
  5. echo "Setting up archive and locations"
  6. psql -c "INSERT INTO archive (name, origin_server, description)
  7. VALUES ('${DAKHOST}', '${DAKFQDN}', 'Master server')" >/dev/null
  8. for component in main contrib non-free-firmware non-free; do
  9. psql -c "INSERT INTO location (path, type, component, archive)
  10. VALUES ('${POOLPATH}', 'pool',
  11. (SELECT id FROM component WHERE name = '${component}'),
  12. (SELECT id FROM archive WHERE name = '${DAKHOST}'))" >/dev/null
  13. done